diff options
author | Hugo van der Sanden <hv@crypt.org> | 2015-02-15 11:44:00 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2015-02-15 23:21:47 +0000 |
commit | 4a0c7558cb3dad795591b57e712bedba39bc1c84 (patch) | |
tree | 9a3ecbb634b4d5a97417b757c079725bf3be15ef /t/re | |
parent | a84da042c65ea56f60cfa9b65a1b4aebb4ac7fb3 (diff) | |
download | perl-4a0c7558cb3dad795591b57e712bedba39bc1c84.tar.gz |
[perl #123843] fix SEGV reading data->flags
This could be triggered by trying to compile eg 'qr{x+(y(?0))*}'.
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/pat.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/re/pat.t b/t/re/pat.t index ddfaebc651..137a049489 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -22,7 +22,7 @@ BEGIN { skip_all_without_unicode_tables(); } -plan tests => 770; # Update this when adding/deleting tests. +plan tests => 772; # Update this when adding/deleting tests. run_tests() unless caller; @@ -1676,6 +1676,14 @@ EOP fresh_perl_is($code, "No infinite loop here!", {}, "test that we handle things like m/\\888888888/ without infinite loops" ); } + + { + # [perl #123843] hits SEGV trying to compile this pattern + my $match; + eval q{ ($match) = ("xxyxxyxy" =~ m{(x+(y(?1))*)}) }; + ok(1, "compiled GOSUB in CURLYM ok"); + is($match, 'xxyxxyx', "matched GOSUB in CURLYM"); + } } # End of sub run_tests 1; |