forked from Perl/perl5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtin::trim: ensure TARG is properly reset
In the reported test case, trim() sets TARG (used for the return value), and that is then evaluated in numeric context, setting the IV slot and pIOK and possible IOK. These aren't reset on the second call to trim from the same entersub OP, and since TARG is re-used it still has the IV slot and pIOK/IOK set, and so uses the cached numeric value when evaluating TARG in numeric context again. Clear all but the string related flags. Fixes Perl#22784
- Loading branch information
Showing
3 changed files
with
10 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package builtin 0.016; | ||
package builtin 0.017; | ||
|
||
use v5.40; | ||
|
||
|
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