-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
steps to reprouce:
gireesh@p1:~/mq/rec1$ node -v
v14.15.4
gireesh@p1:~/mq/rec1$ cat rec.js
var ref = require('ref-napi');
var st = require('ref-struct-di')(ref);
var at = require('ref-array-di')(ref);
var rt = st({
asid: at(ref.types.char,1024),
os: st({ptr: ref.refType(ref.types.void)})
})
var idx = 0
const r = new rt()
r.os.ptr = Buffer.alloc(10)
setInterval(() => {
ref.reinterpret(r.os.ptr, 0, 'utf8');
if (++idx % 1000 === 0) console.log(`${idx}th iteration`)
r.os.ptr = Buffer.alloc(10)
},1)
gireesh@p1:~/mq/rec1$ node rec
1000th iteration
#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x7ffd839cc040
1: 0xa71261 [node]
2: 0x19d3254 V8_Fatal(char const*, ...) [node]
3: 0xe5b549 v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [node]
4: 0xba6a98 v8::ArrayBuffer::GetBackingStore() [node]
5: 0x9c1be0 napi_get_typedarray_info [node]
6: 0x7fea6e5ef0ef [/home/gireesh/mq/rec1/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
7: 0x7fea6e5f15bb [/home/gireesh/mq/rec1/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
8: 0x7fea6e5f7ceb Napi::details::CallbackData<void (*)(Napi::CallbackInfo const&), void>::Wrapper(napi_env__*, napi_callback_info__*) [/home/gireesh/mq/rec1/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node]
9: 0x9b8c6f [node]
10: 0xbe571b [node]
11: 0xbe6cc6 [node]
12: 0xbe7346 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x14012d9 [node]
Illegal instruction (core dumped)
gireesh@p1:~/mq/rec1$
dacevedo12
Metadata
Metadata
Assignees
Labels
No labels