[Webkit-unassigned] [Bug 182327] Getting "TypeError: Underlying ArrayBuffer has been detached from the view" error with WebAssembly code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 1 13:47:27 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182327

--- Comment #7 from Keith Miller <keith_miller at apple.com> ---
(In reply to Alon Zakai from comment #5)
> When emscripten grows memory, it should update all the views for the new
> buffer, making it impossible to access the neutered data. That happens here:
> https://github.com/kripken/emscripten/blob/incoming/src/preamble.js#L874
> 
> However, it's possible in theory that user code would keep a reference to
> one of those heap views, like HEAP8, which gets outdated. That seems
> unlikely to only show up on one browser, though. But it's possible in theory
> that a browser difference could exist in timing of event callbacks.
> 
> To investigate this, I'd recommend one or both of
> 
>  * Building the code with --profiling so that it will give useful stack
> traces. Then hopefully WebKit provides a full stack trace of the location it
> throws that error, and maybe that will make it obvious what's going on.
> 
>  * Remove all possible sources of timing differences: while you can't avoid
> the async compilation, make sure that you start to use the code and do
> everything to show the bug in synchronous code. When you have that, you can
> add some console.logs in a way that should make it clear if this is a WebKit
> bug or not, as everything should be deterministic.

The code is keeping a reference to the buffer. IIRC, the code was something like:

argv_something_ptr = new Int32Array(Module.HEAP32.buffer,...);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180201/fcd05f22/attachment.html>


More information about the webkit-unassigned mailing list