Fix lack of stack trace on ARM#37
Merged
Merged
Conversation
|
I would also add the -rdynamic compiler flag. Otherwise some details are missing. It is more important to use both flags in your own native modules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On ARM, the default installation of this module would produce no stack trace. Example:
root@beaglebone:~/test/node_modules/segfault-handler# node example.js NodeSegfaultHandlerNative: about to dereference NULL (will cause a SIGSEGV) PID 1907 received SIGSEGV for address: 0x2 root@beaglebone:~/test/node_modules/segfault-handler# uname -a Linux beaglebone 4.1.19-bone-rt-r20 #1 Sun Mar 13 04:30:34 UTC 2016 armv7l GNU/LinuxThe fix is to build with
-funwind-tablesas per http://stackoverflow.com/questions/24700150/on-raspberry-pi-backtrace-returns-0-frames:root@beaglebone:~/test/node_modules/segfault-handler# node example.js NodeSegfaultHandlerNative: about to dereference NULL (will cause a SIGSEGV) PID 2268 received SIGSEGV for address: 0x2 /root/test/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x12a0)[0xb68ba2a0] /lib/arm-linux-gnueabihf/libc.so.6(+0x26b00)[0xb68f1b00] /root/test/node_modules/segfault-handler/build/Release/segfault-handler.node(_Z22segfault_stack_frame_1v+0x1f)[0xb68ba5c4] /root/test/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x1434)[0xb68ba434]Works on at least ARM and OS X. See also #24.