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_assertionssetting. 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 thatcargo test --test disas --releaseis broken
before this PR. By using a runtime setting this won't be enabled as
often but we'll still enable it for allwasttesting, for example.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11604.
alexcrichton requested fitzgen for a review on PR #11604.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11604.
alexcrichton updated PR #11604.
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:
[ ] If you added a new
Configmethod, you wrote extensive documentation for
it.<details>
Our documentation should be of the following form:
```text
Short, simple summary sentence.More details. These details can be multiple paragraphs. There should be
information about not just the method, but its parameters and results as
well.Is this method fallible? If so, when can it return an error?
Can this method panic? If so, when does it panic?
Example
Optional example here.
```</details>
[ ] If you added a new
Configmethod, or modified an existing one, you
ensured that this configuration is exercised by the fuzz targets.<details>
For example, if you expose a new strategy for allocating the next instance
slot inside the pooling allocator, you should ensure that at least one of our
fuzz targets exercises that new strategy.Often, all that is required of you is to ensure that there is a knob for this
configuration option in [wasmtime_fuzzing::Config][fuzzing-config] (or one
of its nestedstructs).Rarely, this may require authoring a new fuzz target to specifically test this
configuration. See [our docs on fuzzing][fuzzing-docs] for more details.</details>
[ ] If you are enabling a configuration option by default, make sure that it
has been fuzzed for at least two weeks before turning it on by default.[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.</details>
fitzgen submitted PR review.
fitzgen created PR review comment:
Should this be enabled only for
feature = craneliftand notfeature = winchalso?If we do want this flag for winch as well, perhaps we should rename the method to not have
craneliftin its name? Maybecompiled_code_debug_checks?
alexcrichton submitted PR review.
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
alexcrichton merged PR #11604.
Last updated: Dec 06 2025 at 07:03 UTC