Fix dangling-node elimination to preserve trapping WebAssembly ops#107
Open
leonardoalt wants to merge 1 commit intomainfrom
Open
Fix dangling-node elimination to preserve trapping WebAssembly ops#107leonardoalt wants to merge 1 commit intomainfrom
leonardoalt wants to merge 1 commit intomainfrom
Conversation
Member
|
@codex Remove the options from the match below instead of adding a new match with the exception above. |
lvella
requested changes
Mar 10, 2026
| | Op::I64TruncF32U | ||
| | Op::I64TruncF64S | ||
| | Op::I64TruncF64U | ||
| | Op::TableGet { .. } |
Member
Author
|
@codex check review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
may_have_side_effectclassified many trap-capable Wasm operations as pure, allowing their removal when outputs were unused.Description
may_have_side_effectinsrc/loader/passes/dag/dangling_removal.rsto returntruefor trap-capable Wasm operations so they are treated as having side effects and are not removed by the dangling-node pass.div/rem, truncating float→int conversions,table.get, and memory loads (variousloadopcodes and vector loads).Testing
cargo fmt --checkwhich succeeded.cargo test -q --libwhich succeeded (64 passed; 0 failed).cargo test -qwhich exercised integration/binary tests; the run exhibited pre-existing integration failures and a stack overflow in the--bin womirexecution that are not introduced by this patch (observed test failures remain at integration level).Codex Task