Stream: git-wasmtime

Topic: wasmtime / PR #10537 Run CI tests through AddressSanitizer


view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 15:36):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 15:38):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 16:56):

alexcrichton updated PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 16:57):

alexcrichton commented on PR #10537:

Looks like un-optimized this takes over an hour in CI.

Trying optimized next.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 16:57):

alexcrichton updated PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 18:26):

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

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2025 at 19:10):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:06):

alexcrichton updated PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:07):

alexcrichton updated PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:34):

alexcrichton updated PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:35):

alexcrichton has marked PR #10537 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:35):

alexcrichton requested pchickey for a review on PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:35):

alexcrichton requested wasmtime-default-reviewers for a review on PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:35):

alexcrichton requested wasmtime-core-reviewers for a review on PR #10537.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2025 at 16:35):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2025 at 15:19):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 10 2025 at 15:56):

alexcrichton merged PR #10537.


Last updated: Dec 06 2025 at 06:05 UTC