-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectWrap leak introduced in 8.2.0 #1602
Comments
Repro steps CFLAGS=-fsanitize=address CXXFLAGS=-fsanitize=address npm run pretest
LD_PRELOAD=`clang -print-file-name=libclang_rt.asan-x86_64.so` NODE_API_BUILD_CONFIG=Release node --expose-gc test/objectwrap.js you will see the very first leak reported comes from a ObjectWrap<> construction
If you run this same sequence in on the tag node-addon-api-v8.1.0 the leak won't exist. |
@legendecas I see you have a PR which is related. A couple of questions:
|
@mhdawson #1607 should be sufficient to fix the issue, without any changes in Node.js core. nodejs/node#55620 allows a |
@legendecas thanks for the quick answer and fix! |
When using ObjectWrap that does not override a finalizer a memory leak is occurring.
I traced this back to #1514
Which introduced the following code which seems to trigger the leak. Removing this set eliminated the leak, but its not clear to me how this affects a basic or extended finalizer.
The text was updated successfully, but these errors were encountered: