ffi-napi 2.5.0 crashes on Node 14 on macOS 10.15.4
See original GitHub issueIn an empty directory:
projects/test/testffi ❯ npm i ffi-napi
...
projects/test/testffi took 11s ❯ node
Welcome to Node.js v14.0.0.
Type ".help" for more information.
> os.version()
'Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64'
> require('ffi-napi')
#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7ffeefbf3330
1: 0x1000d5142 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/usr/local/bin/node]
2: 0x100a18c31 V8_Fatal(char const*, ...) [/usr/local/bin/node]
3: 0x100378436 v8::internal::GlobalBackingStoreRegistry::Register(std::__1::shared_ptr<v8::internal::BackingStore>) [/usr/local/bin/node]
4: 0x10018d9e7 v8::ArrayBuffer::GetBackingStore() [/usr/local/bin/node]
5: 0x100063174 node::Buffer::New(node::Environment*, char*, unsigned long, void (*)(char*, void*), void*) [/usr/local/bin/node]
6: 0x100062f0b node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/usr/local/bin/node]
7: 0x10005ea05 napi_create_external_buffer [/usr/local/bin/node]
8: 0x10418c99e Napi::Buffer<char> Napi::Buffer<char>::New<Napi::Value FFI::WrapPointer<_ffi_type>(Napi::Env, _ffi_type*, unsigned long)::'lambda'(Napi::Env, char*)>(napi_env__*, char*, unsigned long, _ffi_type) [/Users/nsabovic/projects/test/testffi/node_modules/ffi-napi/build/Release/ffi_bindings.node]
9: 0x10418742b FFI::FFI::InitializeBindings(Napi::Env, Napi::Object) [/Users/nsabovic/projects/test/testffi/node_modules/ffi-napi/build/Release/ffi_bindings.node]
10: 0x10418b2a3 __napi_Init(napi_env__*, napi_value__*) [/Users/nsabovic/projects/test/testffi/node_modules/ffi-napi/build/Release/ffi_bindings.node]
11: 0x10005e048 napi_module_register_by_symbol(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, napi_value__* (*)(napi_env__*, napi_value__*)) [/usr/local/bin/node]
12: 0x100061e83 std::__1::__function::__func<node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)::$_0, std::__1::allocator<node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)::$_0>, bool (node::binding::DLib*)>::operator()(node::binding::DLib*&&) [/usr/local/bin/node]
13: 0x100061034 node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
14: 0x1001cd7ea v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/usr/local/bin/node]
15: 0x1001cce74 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
16: 0x1001cc698 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
17: 0x10074fe79 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/bin/node]
zsh: illegal hardware instruction node
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Developers - ffi-napi 2.5.0 crashes on Node 14 on macOS 10.15.4 -
In an empty directory: projects/test/testffi ❯ npm i ffi-napi ... projects/test/testffi took 11s ❯ node Welcome to Node.js v14.0.0.
Read more >MacOS Catalina freezing+crashing after running Node.JS ...
I wrote up a simple load testing script that runs N number of hits to and HTTP endpoint over M async parallel lanes....
Read more >ffi-napi-issue-nodejs-v14 - Joel Purra
Using Node.js v14.9.0. Requiring ffi-napi in one package, then in another package crashes node with a core dump. The crash seems to occur...
Read more >Crash on MacOS(M1 series): uncaugh… - Apple Developer
System Info: macOS Montery 12.0.1,MacBook Pro (13-inch, M1, 2020) ... :blurPreviousNode:activityStateChanges:userObject:] + 2088 14 WebKit ...
Read more >node-ffi-napi - npm
A foreign function interface (FFI) for Node.js, N-API style. Latest version: 4.0.3, last published: 2 years ago. Start using ffi-napi in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this bug still exists on ffi-napi 4.0.1
If I were a betting man, I’d wager this had something to do with it:
https://github.com/nodejs/node/pull/30782
In the thread, they also mention the same crash in deps/v8/src/objects/backing-store.cc.