fitzgen opened PR #12351 from fitzgen:more-details-for-oom-errors to bytecodealliance:main:
Fixes https://github.com/bytecodealliance/wasmtime/issues/12199
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested pchickey for a review on PR #12351.
fitzgen requested wasmtime-core-reviewers for a review on PR #12351.
fitzgen updated PR #12351.
alexcrichton created PR review comment:
This can probably use
new().unwrap()with a pretty high degree of certainty that LLVM will see through it due to the| 1above
alexcrichton created PR review comment:
This might be a good use case for a
union:union ToOutOfMemory<T> { oom: OutOfMemory, error: T } // SAFETY: type ids line up etc let oom = unsafe { ToOutOfMemory { error }.oom }; return oom.into();Basically makes the dance a bit more explicit
alexcrichton created PR review comment:
Given the safety requirement of this field could a read-only accessor be
pub(crate)but write access still limited to just this module?
alexcrichton created PR review comment:
This (and below) may wish to be updated because the newtype part is no longer accurate I believe.
alexcrichton submitted PR review:
Thanks for this!
fitzgen updated PR #12351.
fitzgen has enabled auto merge for PR #12351.
fitzgen added PR #12351 Track attempted allocation sizes in OutOfMemory errors to the merge queue.
fitzgen merged PR #12351.
fitzgen removed PR #12351 Track attempted allocation sizes in OutOfMemory errors from the merge queue.
Last updated: Jan 29 2026 at 13:25 UTC