sends segfaults to Bugsnag

Usage no npm install needed!

<script type="module">
  import bugsnagSegfaultHandler from 'https://cdn.skypack.dev/bugsnag-segfault-handler';


A handler for sending segfaults in native node extensions to Bugsnag.


First install both the normal bugsnag-node module, and also the bugsnag-segfault-handler.

npm install --save bugsnag bugsnag-segfault-handler

Then initialize Bugsnag as normal, and also pass it into the Segfault handler:

var bugsnag = require('bugsnag');

var segfaultHandler = require('bugsnag-segfault-handler');
segfaultHandler(bugsnag, {dir: "/tmp/bugsnag-segfaults"});

To test the integration run:


Then run your app twice. The first time it will segfault, the second time it will send the report to Bugsnag.

How it works

When your program receives a Segfault, the segfault module logs the segfault to the directory you specify.

The next time your app starts, we read the segfault report out of that directory and send it to Bugsnag.