diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-09-28 14:44:08 -0600 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-28 15:36:37 -0700 |
commit | ca67da414cee8e3361276f1f6268ca488126da08 (patch) | |
tree | b2d52e98cdf21e176a073008600ecc3c31f409ef | |
parent | 70eadc36be15a2576561830a2c1b077d308db7de (diff) | |
download | perl-ca67da414cee8e3361276f1f6268ca488126da08.tar.gz |
regcomp.c [perl #78058] qr/\18/ loops
This patch restores the behavior of /\18/ to mean /\0018/, which was
inadvertently changed by c99e91e919b4bb89bab7829a9026ee01b1fff2a1.
This bug happens when t the first digit is [1-9], and the
second [89].
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | t/re/re.t | 9 |
2 files changed, 8 insertions, 3 deletions
@@ -7601,7 +7601,7 @@ tryagain: case '0': case '1': case '2': case '3':case '4': case '5': case '6': case '7': case '8':case '9': if (*p == '0' || - (isOCTAL(p[1]) && atoi(p) >= RExC_npar)) + (isDIGIT(p[1]) && atoi(p) >= RExC_npar)) { I32 flags = PERL_SCAN_SILENT_ILLDIGIT; STRLEN numlen = 3; @@ -53,13 +53,18 @@ if ('1234'=~/(?:(?<A>\d)|(?<C>!))(?<B>\d)(?<A>\d)(?<B>\d)/){ is(regnames_count(),3); } - { # Keep this test last, as whole script will be interrupted if times out + { # Keep these tests last, as whole script will be interrupted if times out # Bug #72998; this can loop watchdog(2); eval '"\x{100}\x{FB00}" =~ /\x{100}\N{U+66}+/i'; pass("Didn't loop"); + + # Bug #78058; this can loop + watchdog(2); + eval 'qr/\18/'; + pass("qr/\18/ didn't loop"); } # New tests above this line, don't forget to update the test count below! -BEGIN { plan tests => 19 } +BEGIN { plan tests => 20 } # No tests here! |