assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

as crash when try to alloc large data

Open HerrCai0907 opened this issue 1 year ago • 2 comments

Bug description

AS compiler crash after hang up a few second.

Steps to reproduce

memory.data(0x7fffffff);

npm run asbuild:debug

AssemblyScript version

v0.27.x

HerrCai0907 avatar Mar 18 '24 09:03 HerrCai0907

It looks like most of the time is spent in the allocU8Array call here, but the exception (a simple number, like 2153016872) is thrown in the binaryen._BinaryenSetMemory call without any delay there. I'll look into it a bit more.

CountBleck avatar Mar 24 '24 16:03 CountBleck

Hm, I can only guess that it has something to do with the copy here, since binaryen.js's memory might hit the 4 GiB limit there.

CountBleck avatar Mar 24 '24 16:03 CountBleck