Repository navigation
Issue #540 : Preserve backward jump targets - #561
Open
ViktorBystrov72 wants to merge 1 commit into
Open
ViktorBystrov72 wants to merge 1 commit into
ViktorBystrov72 wants to merge 1 commit into
Conversation
Stop threading jumps when the target is at or before the current instruction. Earlier jump operands have already been changed from label IDs to relative offsets, so looking them up as labels produces invalid bytecode. Cover generic loops containing constant-false branches, returns, outer locals, breaks, nested loops, and unaffected control cases. Signed-off-by: Виктор Быстров <anatema@bk.ru>
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.
Fixes #540.
Changes proposed in this pull request:
This revisits the fix proposed in #541, which was closed by its author without review.
Validation:
make buildandmake testgo test -count=1 ./...on Go 1.23.12 and Go 1.27.3-race -count=20on Go 1.27.3 and-race -count=10on Go 1.23.12go test -race -skip '^TestLocalVarFree$' -count=1 ./...The unfiltered race suite fails the existing finalizer race in
TestLocalVarFree; it also reproduces on unchanged master. Standalonego vet ./...reports identical existing self-assignment/unreachable-code diagnostics on both branches. No test skips or generated-source changes are committed.