Stream: git-wasmtime

Topic: wasmtime / PR #11604 Use a runtime setting for debug checks


view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 21:21):

alexcrichton opened PR #11604 from alexcrichton:fix-release-tests to bytecodealliance:main:

This commit updates Wasmtime's trampoline compilation to insert debug
checks when a runtime setting is configured instead of the compile-time
debug_assertions setting. Using a compile-time variable can be
confusing because it means that different builds of Wasmtime can produce
different output when the builds only differ in optimization settings.
An example of this is that cargo test --test disas --release is broken
before this PR. By using a runtime setting this won't be enabled as
often but we'll still enable it for all wast testing, for example.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 21:21):

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

view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 21:21):

alexcrichton requested fitzgen for a review on PR #11604.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 21:21):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11604.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 21:35):

alexcrichton updated PR #11604.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 03 2025 at 23:44):

github-actions[bot] commented on PR #11604:

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2025 at 19:46):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2025 at 19:46):

fitzgen created PR review comment:

Should this be enabled only for feature = cranelift and not feature = winch also?

If we do want this flag for winch as well, perhaps we should rename the method to not have cranelift in its name? Maybe compiled_code_debug_checks?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2025 at 23:05):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2025 at 23:05):

alexcrichton created PR review comment:

Sort of, it's kind of complicated. The genesis of this particular #[cfg] is a copy/paste from the above function which suffers the same problem you're describing. However it's also correct in that it's only affecting Cranelift-generated code, not Winch-generated code. But it's also true that when you use Winch you always use Cranelift as well (due to trampoline generation being entirely in Cranelift).

So in a sense this is actually accurate, for either compiler configuration this only affects Cranelift. It's all a bit confusing though and my general hope is that this is just some esoteric thing that most won't run into.

I'll spin this out into https://github.com/bytecodealliance/wasmtime/issues/11610 though

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2025 at 23:28):

alexcrichton merged PR #11604.


Last updated: Dec 06 2025 at 07:03 UTC