New issue
Advanced search Search tips

Issue 749735 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

TypedArray allocation crashes the tab on Windows

Project Member Reported by evan....@gmail.com, Jul 27 2017

Issue description

Chrome Version: 60.0.3112.78 (64-bit)
OS: Windows 10 Pro (16gb of RAM)

What steps will reproduce the problem?
(1) Open the developer tools console
(2) Evaluate: new Uint8Array(2*1023*1024*1024),new Uint8Array(2*1023*1024*1024),0

What is the expected result?

Chrome allocates two typed arrays and then returns 0. This is very important for us at Figma since we're an emscripten app. We're using memory growth since our users can create variable-sized documents. We want to be able to use as much memory as possible for really big documents but we don't want to always pre-allocate 2gb since then we would use a ton of memory unnecessarily. Memory growth involves growing the emscripten heap by allocating a new larger typed array and copying the old typed array into the new one, so we temporarily need both the old heap and the new heap to coexist.

What happens instead?

The tab crashes. I would really expect it to be possible to allocate two 2gb typed arrays on a 64-bit browser with 16gb of RAM available, but if that's not possible for some reason than it would be great to at least throw an exception in this case instead of crash the tab. Crashing the tab means users who are creating a really large document will lose their work in Figma.

 
Labels: Needs-Triage-M60
This is reproducible on previous stable#59.0.3071.115 as well.
Components: Blink>JavaScript
Components: -Blink>JavaScript Blink>JavaScript>WebAssembly
Status: Available (was: Untriaged)
I suppose that should now be possible with Wasm of the JS heap?

Sign in to add a comment