In perl.git, the branch smoke-me/nicholas/HP-UX_t-re-pat has been updated <http://perl5.git.perl.org/perl.git/commitdiff/6bf5e03a8d2ad8c7c2d3da2d744852d0bcfcbcb7?hp=c23a69e83f410b43450b9f1e9696d04795aae758>
- Log ----------------------------------------------------------------- commit 6bf5e03a8d2ad8c7c2d3da2d744852d0bcfcbcb7 Author: Nicholas Clark <[email protected]> Date: Tue Jul 30 19:59:48 2013 +0200 Set a large thread stack when running the regex tests in a thread. For testing ithreads cloning, all the regex tests are run twice. Once "normally", and once in a child ithread, to verify that all regex constructions can be cloned. The recently added tests for backreferences starting with 8 or 9 causes a lot of C recursion in the child thread, enough to bust the default thread stack size on (at least) HP-UX. So set a large explicit thread stack size. It doesn't matter that it's large, as we are only running one child thread. ----------------------------------------------------------------------- Summary of changes: t/re/pat.t | 2 ++ t/thread_it.pl | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/t/re/pat.t b/t/re/pat.t index 020068c..fcc52ca 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -1419,6 +1419,8 @@ EOP { # if we have 87 capture buffers defined then \87 should refer to the 87th. # test that this is true for 1..100 + # Note that this test causes the engine to recurse at runtime, and henc + # use a lot of C stack. for my $i (1..100) { my $capture= "a"; $capture= "($capture)" for 1 .. $i; diff --git a/t/thread_it.pl b/t/thread_it.pl index 37d4680..aa5e18b 100644 --- a/t/thread_it.pl +++ b/t/thread_it.pl @@ -26,7 +26,12 @@ require $file; note('running tests in a new thread'); -my $curr = threads->create(sub { +# Currently 59*4096 is the minimum stack size to just get t/re/pat_thr.t to +# pass on HP-UX 64bit PA-RISC. The test for capture buffers (eg \87) +# recurses heavily, and busts the default stack size (65536 on PA-RISC) +my $curr = threads->create({ + stack_size => 524288, + }, sub { run_tests(); return defined &curr_test ? curr_test() : () })->join(); -- Perl5 Master Repository
