Conversation
Member
Author
|
Any thoughts about how to test this? |
kripken
reviewed
Jul 28, 2026
Member
|
For testing, you can use |
Member
|
Also, can we perhaps document this wrapping process somewhere? That neither AI nor I could figure it out in a reasonable time is unfortunate, as I wrote in the other issue. |
kripken
approved these changes
Jul 28, 2026
When a parsed module contains branches to control flow structures other than blocks or loops, IRBuilder must create a wrapper block around the control flow structure for those branches to target. When that wrapper block is pushed onto the stack, the current binary position is attached as its end position. But the matching start position was previously still attached to the original control flow structure. The lack of an end position on the original control flow structure could cause an assertion failure later when then debug info was written back out. Fix the bug by moving the start position from the original control flow structure to the wrapper block where the matching end position will be attached. Fixes #8940.
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 parsed module contains branches to control flow structures other than blocks or loops, IRBuilder must create a wrapper block around the control flow structure for those branches to target. When that wrapper block is pushed onto the stack, the current binary position is attached as its end position. But the matching start position was previously still attached to the original control flow structure. The lack of an end position on the original control flow structure could cause an assertion failure later when then debug info was written back out.
Fix the bug by moving the start position from the original control flow structure to the wrapper block where the matching end position will be attached. Update printing of code offsets to include the end offset to make it more obvious in the test that the bug is fixed.
Fixes #8940.