sigsegv in test/js/returnvalue-test.js
The build log is here: http://aws-logs.debian.net/2016/11/18/node-nan_2.4.0-1_unstable.log Using node 4.6.1 (the debian version).
i don't have a clue yet about why this is happening.
I don't suppose there is a chance you could get a backtrace?
Oh yes, there is :) Luckily it's failing here with node 6.9.1 too, so the backtrace with that version is:
Thread 1 "nodejs" received signal SIGSEGV, Segmentation fault. v8::internal::GlobalHandles::Node::DecreaseBlockUses (this=0x555556719360) at ../deps/v8/src/global-handles.cc:493 493 ../deps/v8/src/global-handles.cc: Aucun fichier ou dossier de ce type. (gdb) bt #0 v8::internal::GlobalHandles::Node::DecreaseBlockUses (this=0x555556719360) at ../deps/v8/src/global-handles.cc:493 #1 v8::internal::GlobalHandles::Node::Release (this=0x555556719360) at ../deps/v8/src/global-handles.cc:126 #2 v8::internal::GlobalHandles::Destroy (location=0x555556719360) at ../deps/v8/src/global-handles.cc:598 #3 0x00007ffff39d7920 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x00007ffff39d797a in exit () from /lib/x86_64-linux-gnu/libc.so.6 #5 0x00007ffff39c22b8 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #6 0x00005555558dd9da in _start ()
It fails if i replace the whole test by require('../build/Release/obj.target/returnvalue'),
but it does not fail if i open a node repl and do the same call.
If i remove that line https://github.com/nodejs/nan/blob/master/test/cpp/returnvalue.cpp#L38 the crash disappears (the test fails of course).
The bug is that the Global destructor runs at process exit and tries to free the object slot but that doesn't work because the VM is dead. In ye olden days, one could check with v8::V8::IsDead() whether it's safe to release but that stopped working in V8 3.29...
We could simply heap-allocate persistent handles in our test suite but it would be helpful if we could fix it more generally because it also affects nan users.
Bbbn