fitzgen requested cfallin for a review on PR #13597.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #13597.
fitzgen requested wasmtime-core-reviewers for a review on PR #13597.
fitzgen opened PR #13597 from fitzgen:wasmtime-bounds-checked-unsafe-intrinsics to bytecodealliance:main:
These intrinsics are similar to the unchecked versions, but instead of taking a raw address, take a base, offset, and length. They do a bounds check first, and trap on out-of-bounds accesses or perform the actual in-bounds access. When Spectre mitigations are enabled, their bounds check has Spectre mitigations applied.
<!--
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
-->
:speech_balloon: cfallin created PR review comment:
s/Specter/Spectre/
:speech_balloon: cfallin created PR review comment:
Deja vu -- is there any way to deduplicate the two implementations here? Especially if we add any other kind of logic to bounds-checking in the future, and especially as it's safety-critical code, it's unfortunate it has to be duplicated...
:speech_balloon: cfallin created PR review comment:
More descriptive panic message here? Note that the above corresponds to a signature declared elsewhere such that mismatches will be caught earlier?
:thumbs_up: cfallin submitted PR review:
Great idea; the bounds-checking logic looks right to me. Just a few comments below.
fitzgen updated PR #13597.
fitzgen updated PR #13597.
fitzgen has enabled auto merge for PR #13597.
:memo: fitzgen submitted PR review.
:speech_balloon: fitzgen created PR review comment:
Deduped. Will send a follow up to dedupe the rest of the methods as well.
fitzgen added PR #13597 Add bounds-checked unsafe intrinsics to the merge queue.
github-merge-queue[bot] removed PR #13597 Add bounds-checked unsafe intrinsics from the merge queue.
fitzgen updated PR #13597.
fitzgen has enabled auto merge for PR #13597.
fitzgen added PR #13597 Add bounds-checked unsafe intrinsics to the merge queue.
github-merge-queue[bot] removed PR #13597 Add bounds-checked unsafe intrinsics from the merge queue.
fitzgen updated PR #13597.
fitzgen has enabled auto merge for PR #13597.
:memo: fitzgen submitted PR review.
:speech_balloon: fitzgen created PR review comment:
Follow up is here: https://github.com/bytecodealliance/wasmtime/pull/13601
github-actions[bot] added the label wasmtime:api on PR #13597.
fitzgen updated PR #13597.
fitzgen commented on PR #13597:
@cfallin mind taking a look at commit https://github.com/bytecodealliance/wasmtime/pull/13597/commits/c78b73b44c1d8e60982aae85f4345bc12a3cc010 ? I had to do a bit of a refactor to make this work when signals-based traps are disabled
fitzgen added PR #13597 Add bounds-checked unsafe intrinsics to the merge queue.
:check: fitzgen merged PR #13597.
fitzgen removed PR #13597 Add bounds-checked unsafe intrinsics from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC