assemblyscript
assemblyscript copied to clipboard
as crash when try to alloc large data
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
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.
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.