This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #118175] prevent a similar overflow for POSIXA
[perl5.git] / t / re / pat_rt_report.t
index e6ee0dd..005f880 100644 (file)
@@ -22,7 +22,7 @@ BEGIN {
 }
 
 
-plan tests => 2530;  # Update this when adding/deleting tests.
+plan tests => 2531;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1157,6 +1157,17 @@ EOP
             '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$\'|,"\n"',
             "c\n", {}, '$\' first mentioned after match');
     }
+
+    {
+       # [perl #118175] threaded perl-5.18.0 fails pat_rt_report_thr.t
+       # this tests some related failures
+       #
+       # The tests in the block *only* fail when run on 32-bit systems
+       # with a malloc that allocates above the 2GB line.  On the system
+       # in the report above that only happened in a thread.
+       my $s = "\x{1ff}" . "f" x 32;
+       ok($s =~ /\x{1ff}[[:alpha:]]+/gca, "POSIXA pointer wrap");
+    }
 } # End of sub run_tests
 
 1;