Fix fallback-split behavior: trim start of minimal bundle wrt start of original LR.#85
Merged
cfallin merged 1 commit intobytecodealliance:mainfrom Sep 22, 2022
Conversation
…f original LR. When a liverange starts at a *late* point of an instruction, and it undergoes the fallback "split into all minimal pieces" transform, we end up creating one minimal bundle that starts at the *early* point of the instruction at the start of the original LR. This can create impossible-to-allocate situations where a fixed-constraint LR overlaps another constrained to the same register (e.g. at calls). We fix this by ensuring the minimal bundle is trimmed only to the half of the instruction that overlaps the original LR. This is analogous to the third fix in bytecodealliance#74, but on the other end (start of LR rather than end of it).
Member
Author
|
This fixes a fuzzbug (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51699 for those with access) and thus a compile panic on |
jameysharp
approved these changes
Sep 22, 2022
Contributor
jameysharp
left a comment
There was a problem hiding this comment.
Hey, I actually understood this one!
Merged
cfallin
added a commit
to cfallin/wasmtime
that referenced
this pull request
Sep 22, 2022
Incorporates bytecodealliance/regalloc2#85, which fixes a fuzzbug related to constraints and liverange splits.
cfallin
added a commit
to bytecodealliance/wasmtime
that referenced
this pull request
Sep 23, 2022
* Upgrade to regalloc2 0.4.1. Incorporates bytecodealliance/regalloc2#85, which fixes a fuzzbug related to constraints and liverange splits. * Add audit of regalloc2 upgrade.
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.
When a liverange starts at a late point of an instruction, and it undergoes the fallback "split into all minimal pieces" transform, we end up creating one minimal bundle that starts at the early point of the instruction at the start of the original LR. This can create impossible-to-allocate situations where a fixed-constraint LR overlaps another constrained to the same register (e.g. at calls). We fix this by ensuring the minimal bundle is trimmed only to the half of the instruction that overlaps the original LR.
This is analogous to the third fix in #74, but on the other end (start of LR rather than end of it).