Skip to content

Commit d013a11

Browse files
committed
regcomp.c: Handle /ss\xdf/iaa properly
Having both ss and \xdf in a string caused the node type to be changed back to a wrong one. This fixes #17486
1 parent e584d91 commit d013a11

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

regcomp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4440,7 +4440,7 @@ S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
44404440
s++;
44414441
}
44424442
}
4443-
else {
4443+
else if (OP(scan) != EXACTFAA_NO_TRIE) {
44444444

44454445
/* Non-UTF-8 pattern, not EXACTFAA node. Look for the multi-char
44464446
* folds that are all Latin1. As explained in the comments

t/re/pat_advanced.t

+6
Original file line numberDiff line numberDiff line change
@@ -2527,6 +2527,11 @@ EOF
25272527
"", {}, "*COMMIT caused positioning beyond EOS");
25282528
}
25292529

2530+
{ # [GH #17486] Previously assertion failure
2531+
fresh_perl_is('0=~/(?iaa)ss\337(?0)|/',
2532+
"", {}, "EXACTFUP node isn't changed into something else");
2533+
}
2534+
25302535

25312536
# !!! NOTE that tests that aren't at all likely to crash perl should go
25322537
# a ways above, above these last ones. There's a comment there that, like
@@ -2536,3 +2541,4 @@ EOF
25362541
} # End of sub run_tests
25372542

25382543
1;
2544+
0=~/(?iaa)ss\337(?0)|/

0 commit comments

Comments
 (0)