Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Disable v8's trap handler1 to workaround ENOMEM on sv39 systems2.
v8's OOB trap handler for wasm tries to allocate a 10 GB guard region3, 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
errorsThere is a second bug in 2, which needs to be investigated separately and disabling trap handler won't fix it.
Footnotes
https://chromium-review.googlesource.com/c/v8/v8/+/5227604 ↩
https://github.com/riscv-forks/electron/issues/3#issuecomment-2391689815 ↩ ↩2
https://github.com/nodejs/node/blob/09a8440b45f69651ff52110cb1bc2dde9e14e2e8/deps/v8/src/objects/backing-store.cc#L38 ↩