alexcrichton opened PR #10537 from alexcrichton:asan to bytecodealliance:main:
This is similar to running tests in Valgrind (which we should perhaps also do...) but can be useful for catching use-after-free style bugs faster than when a process crashes. Given the unsafe nature of Wasmtime this is something we should have probably enabled awhile back but otherwise so long as it doesn't take too long to run on CI seems like an easy win of a boost-of-confidence.
prtest:asan
<!--
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 commented on PR #10537:
This contains https://github.com/bytecodealliance/wasmtime/pull/10534 and https://github.com/bytecodealliance/wasmtime/pull/10535 so the diff isn't purely asan-specific, but I'm otherwise keeping this as a draft for now while CI is evaluated.
alexcrichton updated PR #10537.
alexcrichton commented on PR #10537:
Looks like un-optimized this takes over an hour in CI.
Trying optimized next.
alexcrichton updated PR #10537.
alexcrichton commented on PR #10537:
Ok 25 minutes much more reasonable, I might look into sharding this test suite though like we do all the others
fitzgen commented on PR #10537:
This is similar to running tests in Valgrind (which we should perhaps also do...) but can be useful for catching use-after-free style bugs faster than when a process crashes. Given the unsafe nature of Wasmtime this is something we should have probably enabled awhile back but otherwise so long as it doesn't take too long to run on CI seems like an easy win of a boost-of-confidence.
A note for anyone following along at home: this comment isn't quite as scary as it might otherwise seem, since we already run as many tests under MIRI (an undefined behavior-detecting interpreter for Rust's MIR internal representation) as we can, which gives us many of the same (although not fully overlapping) benefits that asan and valgrind give. That said, more coverage with more tools is always welcome! See also https://bytecodealliance.org/articles/security-and-correctness-in-wasmtime for more details on our various approaches to security and correctness in Wasmtime.
alexcrichton updated PR #10537.
alexcrichton updated PR #10537.
alexcrichton updated PR #10537.
alexcrichton has marked PR #10537 as ready for review.
alexcrichton requested pchickey for a review on PR #10537.
alexcrichton requested wasmtime-default-reviewers for a review on PR #10537.
alexcrichton requested wasmtime-core-reviewers for a review on PR #10537.
alexcrichton commented on PR #10537:
Ok I've rebased this and gone with sharding. Un-sharded tests are 25 minutes and with sharded tests wasmtime-cli takes the longest and clocks in at ~17m which is below our current longest time I believe.
dicej submitted PR review.
alexcrichton merged PR #10537.
Last updated: Dec 06 2025 at 06:05 UTC