Skip to content

AsmJS' malloc aborts on OOM instead of returning NULL #48968

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
snf opened this issue Mar 12, 2018 · 0 comments
Closed

AsmJS' malloc aborts on OOM instead of returning NULL #48968

snf opened this issue Mar 12, 2018 · 0 comments
Labels
A-allocators Area: Custom and system allocators C-enhancement Category: An issue proposing an enhancement or a PR with one. O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@snf
Copy link
Contributor

snf commented Mar 12, 2018

It should be as easy as passing the flag ABORTING_ALLOC=0 to emcc.
It's blocking Fallible Allocation RFC

@kennytm kennytm added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-allocators Area: Custom and system allocators T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. O-asmjs Target: asm.js - http://asmjs.org/ labels Mar 15, 2018
kennytm added a commit to kennytm/rust that referenced this issue Mar 15, 2018
setting ABORTING_MALLOC=0 for asmjs backend

This changes the behaviour of the allocator for asmjs backend.
It will return NULL on OOM instead of aborting and let Rust choose the behaviour.
Fixes rust-lang#48968 and enables try_reserve (fallible allocation) in asmjs.
@workingjubilee workingjubilee added the O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! label Oct 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-allocators Area: Custom and system allocators C-enhancement Category: An issue proposing an enhancement or a PR with one. O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants