Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active October 30, 2015 05:02
Show Gist options
  • Save kjunichi/986ebb112ddc9d997350 to your computer and use it in GitHub Desktop.
Save kjunichi/986ebb112ddc9d997350 to your computer and use it in GitHub Desktop.
node-ffi can't run under Node.js v5.0.0
var ffi = require('../')

var funcPtr = ffi.Callback('int', [ 'int' ], Math.abs)
var func = ffi.ForeignFunction(funcPtr, 'int', [ 'int' ])

func(-3)
global.gc()
func(-3)
node --expose_gc test.js
FATAL ERROR: v8::ArrayBuffer::Neuter Only externalized ArrayBuffers can be neutered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment