Add a test for GH#4693, fixed at some point in the past#24388
Open
richardleach wants to merge 1 commit into
Open
Add a test for GH#4693, fixed at some point in the past#24388richardleach wants to merge 1 commit into
richardleach wants to merge 1 commit into
Conversation
Contributor
|
We can bisect to determine when the bug was fixed. Bisecting with the following invocation: ... where the (admittedly unrefined) program being run by ... pointed to 51a82aa (v5.21.5-77-g51a82aa9fb) as the commit where behavior changed (in this case, where the bug was fixed): @richardleach, there were some tests added in the corrective commit, which may affect where your tests should be placed. |
This old ticket pertains to incorrect line numbers when a LOGOP condition
can be evaluated at compile time.
```
if (0) {print "aa";}
elsif (1) {print "bb";}
```
The condition and untaken branch are freed during compilation. At some point,
the surviving optree did not include a COP containing an accurate line number.
It does nowadays, but there doesn't seem to be a dedicated test for it. This
commit adds one, plus tests for `if()` and `else()` variants.
Contributor
Author
|
Thanks @jkeenan. Tests moved to t/op/runlevel.t. |
e7df4b3 to
1708f36
Compare
tonycoz
approved these changes
Apr 30, 2026
jkeenan
approved these changes
Apr 30, 2026
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.
This old ticket pertains to incorrect line numbers when a LOGOP condition can be evaluated at compile time.
The condition and untaken branch are freed during compilation. At some point, the surviving optree did not include a COP containing an accurate line number.
It does nowadays, but there doesn't seem to be a dedicated test for it. This commit adds one, plus tests for
if()andelse()variants.Closes #4693