summaryrefslogtreecommitdiff
path: root/t/thread_it.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-07-30 19:59:48 +0200
committerNicholas Clark <nick@ccl4.org>2013-08-01 12:02:00 +0200
commit66478a1b3096c57617a7adbfc1efe497d55d60ad (patch)
tree36dce7ac3cb3916c6eeb7b016c24650b2dfa46e0 /t/thread_it.pl
parente2cae4ae122b34bfc6d48968972c815ea6a82138 (diff)
downloadperl-66478a1b3096c57617a7adbfc1efe497d55d60ad.tar.gz
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.
Diffstat (limited to 't/thread_it.pl')
-rw-r--r--t/thread_it.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/thread_it.pl b/t/thread_it.pl
index 37d4680411..aa5e18b97c 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();