File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ skip_all_without_unicode_tables();
2828my $has_locales = locales_enabled(' LC_CTYPE' );
2929my $utf8_locale = find_utf8_ctype_locale();
3030
31- plan tests => 1265 ; # Update this when adding/deleting tests.
31+ plan tests => 1267 ; # Update this when adding/deleting tests.
3232
3333run_tests() unless caller ;
3434
@@ -2512,6 +2512,22 @@ SKIP:
25122512 ok($str =~ s / $copy/ PQR/ , ' replaced $copy with PQR' );
25132513 is($str , " PQR" , ' final string should be PQR' );
25142514 }
2515+ {
2516+ # github #21661
2517+ fresh_perl_is(<<'PROG' , <<'EXPECT' , {}, " double-free on fatal warn with existing error" );
2518+ use warnings FATAL => qw(all);
2519+ /() {}/X;
2520+ PROG
2521+ Unknown regexp modifier " /X" at - line 2, at end of line
2522+ Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m / () { <-- HERE }/ at - line 2.
2523+ Execution of - aborted due to compilation errors.
2524+ EXPECT
2525+ fresh_perl_is(<<'PROG' , " " , {}, " leak if __WARN__ handler dies" );
2526+ use warnings;
2527+ local $SIG{__WARN__} = sub { die; };
2528+ eval "qr/()x{/;" for 1..10;
2529+ PROG
2530+ }
25152531} # End of sub run_tests
25162532
251725331;
You can’t perform that action at this time.
0 commit comments