-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
n-api segfault in v8impl::Reference::FinalizeCallback
#33283
Comments
Was that with node and the addon compiled in debug mode? If not this link provides some info on doing that: https://github.com/nodejs/node/blob/master/doc/guides/investigating_native_memory_leak.md#enabling-debug-symbols-to-get-more-information and I'm hoping we might get more info out of the stack. |
@codebytere can I run the test by hand? Like, |
I was able to run
successfully several times in a row. Nevertheless, it reliably dies when running
|
@gabrielschulhof that was a strange thing i discovered - it doesn't die in isolation but reliably does so when part of the suite 🤔 |
diff --git a/binding.gyp b/binding.gyp
index a5f9525..38d6607 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -79,13 +79,13 @@
['OS=="win"', {
'link_settings': {
'libraries': [
- '<(module_root_dir)/build/Release/libcmark-gfm.lib'
+ '<(PRODUCT_DIR)/libcmark-gfm.lib'
]
}
}, {
'link_settings': {
'libraries': [
- '<(module_root_dir)/build/Release/cmark-gfm.a'
+ '<(PRODUCT_DIR)/cmark-gfm.a'
]
}
}] makes |
@codebytere it won't crash with Node.js 14.2.0 in debug mode with the package built in debug mode 🙁 I'm wondering if it's #33508 ... |
@codebytere FWIW it doesn't crash as of 5536044. |
@codebytere I ran a bisect and it looks like 8f10bb2 fixed it. |
Oh rad! thanks @gabrielschulhof 🙇🏻♀️ |
v14.2.0
Linux vagrant 4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
n-api
What steps will reproduce the bug?
$ git clone https://github.com/codebytere/node-cmark-gfm $ npm i $ npm test
It will segfault in the
extensions
portion of the test suite - this does not occur onv12.x
so i'm reasonably sure it's a regression. It also does not occur on macOS.I dug into it a little and surfaced the following stacktrace:
How often does it reproduce? Is there a required condition?
This reproduces about 95% of the time.
What is the expected behavior?
For it not to crash.
What do you see instead?
It segfaults.
Additional information
I believe it may be connected to this PR: #31638. I'm also happy to take a crack at this if i could get some pointers on possible underlying cause.
cc @gabrielschulhof
The text was updated successfully, but these errors were encountered: