// given code
const v8 = require('v8');
v8.getHeapSnapshot()
v8.getHeapSnapshot()
no crash, the API returns streams
I can easily recreate it, so any more info can be collected if needed.
Can you post the stack trace here?
@joyeecheung - Thanks for the reply and here is the stack trace of the code.
``` #0 0x0000000000fd8522 in v8::internal::wasm::WasmFullDecoder<(v8::internal::wasm::Decoder::ValidateFlag)1, v8::internal::wasm::EmptyInterface>::DecodeFunctionBody() ()
```
Just noticed that I ran into this independently of this issue – https://chromium-review.googlesource.com/c/v8/v8/+/2464823 fixes this.
@addaleax so is this a problem with the v8 GC or node?
@RaisinTen It’s a V8 bug, yes, not caused by the GC implementation but related to GC timing. We could work around it if necessary, but usually the V8 team responds very quickly during working hours (… faster than Node.js for sure :slightly_smiling_face: )
@addaleax :slightly_smiling_face:
I read it and this is what I understood:
Did I get it right? I don't think I understand how we can work around this though.
@RaisinTen Not quite… the process for creating a snapshot is:
Now… that last bit is a bit tricky: V8 implements “Delete the snapshot object” in 2 different ways:
Part of the problem is the word “complete” here.
Now, when running the script from the issue here …
@addaleax thank you for the awesome explanation! :slightly_smiling_face:
Most helpful comment
@RaisinTen Not quite… the process for creating a snapshot is:
Now… that last bit is a bit tricky: V8 implements “Delete the snapshot object” in 2 different ways:
Part of the problem is the word “complete” here.
Now, when running the script from the issue here …