Socket
Socket
Sign inDemoInstall

segfault-handler

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

segfault-handler - npm Package Compare versions

Comparing version 0.2.5 to 1.0.0

includes/StackWalker.h

0

example.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

@@ -0,0 +0,0 @@

2

package.json
{
"name": "segfault-handler",
"description": "catches SIGSEGV and prints diagnostic information",
"version": "0.2.5",
"version": "1.0.0",
"author": "Dave Dopson <ddopson@gmail.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -11,3 +11,3 @@ # Overview

SegfaultHandler.registerHandler();
SegfaultHandler.registerHandler("crash.log"); // With no argument, SegfaultHandler will generate a generic log file name

@@ -20,3 +20,3 @@ SegfaultHandler.causeSegfault(); // simulates a buggy native module that dereferences NULL

After running the above sample, you will see a stacktrace that looks like:
After running the above sample, you will see a stacktrace on OSX and Linux that looks like:

@@ -33,2 +33,25 @@ ```

And on Windows:
```
PID 11880 received SIGSEGV for address: 0xfe101419
SymInit: Symbol-SearchPath: '.;c:\github\node-segfault-handler;c:\Program Files\nodejs;C:\Windows;C:\Windows\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'tylerw'
OS-Version: 6.3.9600 () 0x100-0x1
c:\github\node-segfault-handler\src\stackwalker.cpp (941): StackWalker::ShowCallstack
c:\github\node-segfault-handler\src\segfault-handler.cpp (114): segfault_handler
00007FFF0A2622C7 (ntdll): (filename not available): RtlNormalizeString
00007FFF0A2138FE (ntdll): (filename not available): RtlWalkFrameChain
00007FFF0A29544A (ntdll): (filename not available): KiUserExceptionDispatcher
c:\github\node-segfault-handler\src\segfault-handler.cpp (138): segfault_stack_frame_1
c:\github\node-segfault-handler\node_modules\nan\nan_callbacks_12_inl.h (175): Nan::imp::FunctionCallbackWrapper
00007FF64489D4A9 (node): (filename not available): v8::Unlocker::~Unlocker
00007FF644865E90 (node): (filename not available): v8::Unlocker::~Unlocker
00007FF644863D79 (node): (filename not available): v8::Unlocker::~Unlocker
00000000C3D060A6 ((module-name not available)): (filename not available): (function-name not available)
000000E36B69E3F8 ((module-name not available)): (filename not available): (function-name not available)
00000000C3D43D02 ((module-name not available)): (filename not available): (function-name not available)
```
Be aware that in production environments, pdb files must be included as part of your install to resolve names / lines in Windows stack traces.
Now you can start debugging using tools like "objdump -dS module.node" to try and sort out what the stack actually means. Sometimes, just identifying _which_ native module is causing problems is the biggest win.

@@ -40,2 +63,4 @@

We are using the callstack walker project from [Walking the Callstack](http://www.codeproject.com/Articles/11132/Walking-the-callstack).
This software is licensed for use under the [WTFPL](http://en.wikipedia.org/wiki/WTFPL); version 2 if it's a lawyer asking. Though if you make good use of this or any of my other tools, I'd appreciate an email letting me know what you used it for or how you stumbled across it.

@@ -42,0 +67,0 @@

@@ -0,0 +0,0 @@ ### 0.2.4 (2014-11-06)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc