Skip to content

Always emit code assuming the GC heap base might be relocated#13165

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
fitzgen:issue-13141
Apr 21, 2026
Merged

Always emit code assuming the GC heap base might be relocated#13165
alexcrichton merged 2 commits intobytecodealliance:mainfrom
fitzgen:issue-13141

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Apr 21, 2026

Because we lazily allocate the GC heap, it can always do one "move" from null to non-null, even if it cannot move otherwise after that.

Also allow specifying flags = ... in .wast tests.

Fixes #13141
Fixes #13134

Because we lazily allocate the GC heap, it can always do one "move" from null to
non-null, even if it cannot move otherwise after that.

Also allow specifying `flags = ...` in `.wast` tests.

Fixes bytecodealliance#13141
Fixes bytecodealliance#13134
@fitzgen fitzgen requested a review from a team as a code owner April 21, 2026 18:17
@fitzgen fitzgen requested review from dicej and removed request for a team April 21, 2026 18:17
Copy link
Copy Markdown
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W.r.t. flags = "..." within *.wast, I'm not opposed but it'll need plumbing through to fuzzing as well where *.wast tests are running with different permutations of flags. That may be relatively difficult to plumb without a sort of "union" operation between to flags-for-config which feels a bit overweight for this. Alternatively though this could be added as a *.wast test and it'll naturally get tested with various permutations of flags, and then this could additionally have a tests/all/*.rs test which sets the specific flags for the regression

Comment thread tests/wast.rs Outdated
Comment on lines +158 to +160
if config.pooling && !flags.is_empty() {
return Ok(());
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wast pooling logic sets different tunables from the GC heap options, so things start breaking. And there isn't a great way to do the unioning of options because we don't expose getters on wasmtime::Config. I'll just rip that stuff out I guess.

@fitzgen fitzgen requested a review from alexcrichton April 21, 2026 19:13
@alexcrichton alexcrichton added this pull request to the merge queue Apr 21, 2026
Merged via the queue into bytecodealliance:main with commit 939f3d0 Apr 21, 2026
48 checks passed
@fitzgen fitzgen deleted the issue-13141 branch April 21, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught segfault with GC tunables potential gc fuzzbug: ASAN hits overflow and Segmentation fault

2 participants