alexcrichton opened PR #11320 from alexcrichton:adjust-some-allocation-safety to bytecodealliance:main:
These were previously marked as
unsafetrait methods with a requirement that the memory/table shape must be validated ahead of time. Neither the ondemand nor pooling allocator actually has an unsafe contract to uphold with respect to this and both may assert/reject non-validated shapes but memory unsafety won't happen as a result. Consequently these functions are made safe.Instance allocation functions are adjusted to reflect how the correctness of
importsis required for the functions to be safe.<!--
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
-->
alexcrichton requested pchickey for a review on PR #11320.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11320.
fitzgen submitted PR review.
fitzgen merged PR #11320.
Last updated: Dec 06 2025 at 07:03 UTC