-
-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler failing at optimization step with a big .ts file #2810
Comments
Here is the complete error it seems:
|
It seems to work if binaryen.js is built with a maximum of 4 GiB of memory (which is the hard maximum according to wasm-ld, likely because it's Wasm32). Here's the gzipped bla.wasm by the way. The time needed on my 15" mid-2014 MacBook Pro: |
Thanks so much @CountBleck ! I have a couple of questions then :
|
Yes, I mean the amount of memory available to Binaryen. To detect that error, perhaps one could check the size of Also, it might be good to bump the maximum memory in binaryen.js to 4 GiB regardless. |
How do you do that ? I see only a few options are forwarded to binaryen from asc
Same ... any pointers on how I can access these ? |
Binaryen should use |
Yeah, that's basically the flag I used.
That's done when binaryen.js is built, using the flag Max said.
That would likely be done within |
Also, we could try to update binaryen.js to latest. Perhaps there are some fixes, improvements and less memory leakage or consumption. |
I have zero experience with updating AS's binaryen.js version, which is why I haven't just stuck the flag in the action yet. Also, I tested AS with the latest version of binaryen.js, and it doesn't work with the default 2 GiB. |
This change is part of fixing AssemblyScript/assemblyscript#2810. The stack size flag has been removed, as Binaryen has updated their defaults accordingly.
This change is part of fixing AssemblyScript/assemblyscript#2810. The stack size flag has been removed, as Binaryen has updated their defaults accordingly.
This version of binaryen.js has the requisite 4 GiB max memory change. Fixes AssemblyScript#2810.
This version of binaryen.js has the requisite 4 GiB max memory change. Fixes AssemblyScript#2810.
@sebpiq Sadly, I'm not sure if there's a reliable way to detect OOM. I might look into it further, but the next version of AS (released in a day or two) should allow your code to be built. |
This version of binaryen.js has the requisite 4 GiB max memory change. Fixes AssemblyScript#2810.
Thanks a lot ! |
It may also be memory leak in binaryen: WebAssembly/binaryen#6239 |
Sorry for coming back so late to you ! I have upgraded to latest AssemblyScript version and indeed it works now ;) Thanks so much for the help ! |
Bug description
I am trying to compile a big file (~130k lines) that was machine generated, and is doing audio synthesis.
After a while the compiler returns the following error :
Some of the things I have tried :
Steps to reproduce
Run
npx asc -O tmp/bla.ts
with the enclosed file (zipped because github doesn't support uploading .ts files) :bla.zip
AssemblyScript version
v0.27.22
The text was updated successfully, but these errors were encountered: