Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable v8's trap handler[1] to workaround ENOMEM on sv39 systems[2]. v8's OOB trap handler for wasm tries to allocate a 10 GB guard region[3], but unfortunately on sv39 systems we only have 256GB virtual memory for userspace, which is usually already exhausted by the node process and leads to `WebAssembly.Instance(): Out of memory: Cannot allocate Wasm memory for new instance` errors There is a second bug in [2], which needs to be investigated separately and disabling trap handler won't fix it. [1]: https://chromium-review.googlesource.com/c/v8/v8/+/5227604 [2]: riscv-forks/electron#3 (comment) [3]: https://github.com/nodejs/node/blob/09a8440b45f69651ff52110cb1bc2dde9e14e2e8/deps/v8/src/objects/backing-store.cc#L38
- Loading branch information