Repository navigation
Memory leak #25531
Description
Activity
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.)
- addedquestionIssues asking questions about Node.js.Issues asking questions about Node.js.memoryIssues and PRs related to Node.js memory management or memory footprint.Issues and PRs related to Node.js memory management or memory footprint.
on Jan 16, 2019 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.)
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.
Thanks @addaleax for taking a look into this.
I just git clone the node.js repo in this case to find above memory leaks.@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…Sure.
Steps to reproduce
CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 ./autogen.sh CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 ./configure CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 make ./node Ctrl+C or Ctrl+D to exit from nodeWe 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?
Sure.
Steps to reproduce
CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 ./autogen.sh CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 ./configure CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 make ./node Ctrl+C or Ctrl+D to exit from node@bnoordhuis this was just an example, to reproduce the issue here are the exact steps:
- git clone https://github.com/nodejs/node.git
- cd node
- CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 ./configure
- CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 make
- ./node
Once you are in node terminal press
CTRL+CorCTRL+Dthe above memory leaks will be generated.
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
node.txt