You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes a regression caused by #150: Unhandled Promise Rejection: TypeError: Underlying ArrayBuffer has been detached from the view (Safari) TypeError: Cannot perform %TypedArray%.prototype.set on a detached ArrayBuffer (Chrome)
It's troubling our unit test don't catch this but with my limited knowledge of JS memory management I don't know how to reliably recreate it.
Good catch! As far as I understand, WebAssembly.Memory detaches its internal ArrayBuffer when memory.grow instruction is executed because ArrayBuffer is a fixed-size array. So we need to access WebAssembly.Memory.buffer every time.
Good catch! As far as I understand, WebAssembly.Memory detaches its internal ArrayBuffer when memory.grow instruction is executed because ArrayBuffer is a fixed-size array. So we need to access WebAssembly.Memory.buffer every time.
In my case there is no explicit call to .grow anywhere, perhaps it's detached in more cases.
app.js:139 TypeError: Cannot perform DataView.prototype.setBigUint64 on a detached ArrayBuffer
at DataView.setBigUint64 ()
at clock_res_get (index.esm.js:114:167)
at __wasi_clock_res_get (1ddb7b2a:0x3b79363)
at clock_getres (1ddb7b2a:0x3b767a8)
at __CFDateInitialize (1ddb7b2a:0x2ff76e7)
at __CFInitialize (1ddb7b2a:0x2fb8851)
at __wasm_call_ctors (1ddb7b2a:0x76f37)
at _initialize (1ddb7b2a:0x76f56)
at startWasiTask (app.js:133:26)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a regression caused by #150:
Unhandled Promise Rejection: TypeError: Underlying ArrayBuffer has been detached from the view(Safari)TypeError: Cannot perform %TypedArray%.prototype.set on a detached ArrayBuffer(Chrome)It's troubling our unit test don't catch this but with my limited knowledge of JS memory management I don't know how to reliably recreate it.