Repository navigation
Closed
Description
Hi Team,
Summary
I have build node.js using AFL integrated ASAN in ubuntu 16.04 LTS and while executing the node program multiple memory leaks were observed, also please find attached .txt file to view full direct leak.
ASAN
Direct leak of 3240 byte(s) in 5 object(s) allocated from:
#0 0x9ba6f0 (/home/input0/node/out/Release/node+0x9ba6f0)
#1 0x247a471 (/home/input0/node/out/Release/node+0x247a471)
#2 0x24840af (/home/input0/node/out/Release/node+0x24840af)
#3 0x2484b89 (/home/input0/node/out/Release/node+0x2484b89)
#4 0x15ccd11 (/home/input0/node/out/Release/node+0x15ccd11)
#5 0xd22d9c (/home/input0/node/out/Release/node+0xd22d9c)
#6 0x98e102 (/home/input0/node/out/Release/node+0x98e102)
Direct leak of 1296 byte(s) in 2 object(s) allocated from:
#0 0x9ba6f0 (/home/input0/node/out/Release/node+0x9ba6f0)
#1 0x247a471 (/home/input0/node/out/Release/node+0x247a471)
#2 0x2429b12 (/home/input0/node/out/Release/node+0x2429b12)
#3 0x24462a3 (/home/input0/node/out/Release/node+0x24462a3)
#4 0x2442c88 (/home/input0/node/out/Release/node+0x2442c88)
#5 0x241b547 (/home/input0/node/out/Release/node+0x241b547)
#6 0x2428778 (/home/input0/node/out/Release/node+0x2428778)
#7 0x234fb0f (/home/input0/node/out/Release/node+0x234fb0f)
#8 0x2351471 (/home/input0/node/out/Release/node+0x2351471)
#9 0x2412047 (/home/input0/node/out/Release/node+0x2412047)
#10 0x22d1c5c (/home/input0/node/out/Release/node+0x22d1c5c)
#11 0x22c6ac4 (/home/input0/node/out/Release/node+0x22c6ac4)
#12 0x22bed48 (/home/input0/node/out/Release/node+0x22bed48)
#13 0x22ed4a2 (/home/input0/node/out/Release/node+0x22ed4a2)
#14 0x22ed5c3 (/home/input0/node/out/Release/node+0x22ed5c3)
#15 0x2234cd7 (/home/input0/node/out/Release/node+0x2234cd7)
#16 0x21aeb87 (/home/input0/node/out/Release/node+0x21aeb87)
#17 0x21b84a6 (/home/input0/node/out/Release/node+0x21b84a6)
#18 0x24abe0d (/home/input0/node/out/Release/node+0x24abe0d)
#19 0x24b1a39 (/home/input0/node/out/Release/node+0x24b1a39)
#20 0x24b331d (/home/input0/node/out/Release/node+0x24b331d)
#21 0x24aeda6 (/home/input0/node/out/Release/node+0x24aeda6)
#22 0x24ada0a (/home/input0/node/out/Release/node+0x24ada0a)
#23 0x24d2998 (/home/input0/node/out/Release/node+0x24d2998)
#24 0x481326d (/home/input0/node/out/Release/node+0x481326d)
#25 0x483a5ae (/home/input0/node/out/Release/node+0x483a5ae)
#26 0x7e8a29f8816d (<unknown module>)
#27 0x7e8a29f8816d (<unknown module>)
#28 0x7e8a29f8816d (<unknown module>)
#29 0x7e8a29f8816d (<unknown module>)
.......
SUMMARY: AddressSanitizer: 36953 byte(s) leaked in 305 allocation(s).
Activity
bnoordhuis commentedon Jan 16, 2019
Without symbolic names the output isn't that useful if you built from source. That said, it's not unexpected for tools like msan and valgrind to complain because Node.js doesn't free memory on exit (because what's the point - the OS reclaims it anyway.)
addaleax commentedon Jan 17, 2019
We do a lot more cleanup since Node 10, btw, so knowing which version you’re building might also help.
There are also 1 or 2 “valid” memory leaks in the valgrind suppression file listed in #25498, if you want to compare.
RootUp commentedon Jan 17, 2019
Thanks @addaleax for taking a look into this.
I just git clone the node.js repo in this case to find above memory leaks.
addaleax commentedon Jan 18, 2019
@RootUp Can you provide e.g. steps to reproduce? Or, like @bnoordhuis said, symbolic names (e.g. a copy of the
nodebinary used for this)? The .txt file is not much more than a list of random numbers on its own…RootUp commentedon Jan 18, 2019
Sure.
Steps to reproduce
bnoordhuis commentedon Jan 21, 2019
We don't have an autogen.sh script. Neither does the binary print that "Ctrl+C or Ctrl+D to exit" message. Where did you get your copy of node from?
RootUp commentedon Jan 21, 2019
@bnoordhuis this was just an example, to reproduce the issue here are the exact steps:
Once you are in node terminal press
CTRL+CorCTRL+Dthe above memory leaks will be generated.