example.js 226 B

123456
  1. #!/usr/bin/env node
  2. var SegfaultHandler = require('./'); // you'd use require('segfault-handler')
  3. SegfaultHandler.registerHandler();
  4. SegfaultHandler.causeSegfault(); // simulates a buggy native module that dereferences NULL