-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OP_SUBSTR_LEFT: GH#22914 - multiple pointers to replacement OP
The recent initial commit for OP_SUBSTR_LEFT failed to account for there being multiple paths from a non-trivial LENGTH to the "" replacement CONST OP. This could result in the replacement SV being erroneously pushed to the stack, causing `pp_substr_left` to try to operate on the wrong SV. This commit nulls out the replacement OP, so that even if it is encountered, no erroneous SV is pushed. Contrary to the comment in the original commit, this actually does not break B::Deparse. Thanks to @mauke for figuring this out and preparing a patch before I'd even opened my browser.
- Loading branch information
1 parent
7a1c156
commit 8ccd351
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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