Closed
Description
- Version: v12.12.0 and v14.8.0
- Platform: Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64
- Subsystem: fs
What steps will reproduce the bug?
$ LONG_PATH='/tmp/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/path/254B'
$ SHORT_LINK='/tmp/short'
$ mkdir -p "${LONG_PATH}"
$ ln -s "${LONG_PATH}" "${SHORT_LINK}"
$ node -e "fs.realpathSync.native('${SHORT_LINK}/file-not-exist')"
node(60274,0x10eabedc0) malloc: Incorrect checksum for freed object 0x104805aa0: probably modified after being freed.
Corrupt value: 0x7473697865
node(60274,0x10eabedc0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
How often does it reproduce? Is there a required condition?
Almost every time.
What is the expected behavior?
return ENOENT.
What do you see instead?
Crash with SIGABRT
Additional information
The bug is confirmed by the libuv and the patch is underway: libuv/libuv#2965