diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-19 14:50:46 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-19 15:14:54 -0600 |
commit | 6438af90e1f793b4872222495896a0ce09ccb849 (patch) | |
tree | 4891799fde2a2897fe471e7d02a02bf3973f7c2e /t/re | |
parent | 75da9d4c616bae3e6791af93d2ced52dc8080f06 (diff) | |
download | perl-6438af90e1f793b4872222495896a0ce09ccb849.tar.gz |
Stop hang in regex
The algorithm for mapping multi-char fold matches back to the source in
processing ANYOF nodes was defective. This caused the regex engine to
hang on certain character combinations. I've also added an assert to
stop instead of loop.
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/pat_advanced.t | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t index 225cb193e8..55e1f8637a 100644 --- a/t/re/pat_advanced.t +++ b/t/re/pat_advanced.t @@ -2112,6 +2112,11 @@ EOP ok(1, $message); # If it didn't crash, it worked. } + { # Was looping + watchdog(2); + like("\x{00DF}", qr/[\x{1E9E}_]*/i, "\"\\x{00DF}\" =~ /[\\x{1E9E}_]*/i was looping"); + } + # !!! NOTE that tests that aren't at all likely to crash perl should go # a ways above, above these last ones. |