[perl #45053] Memory corruption with heavy module loading in threads
[p5sagit/p5-mst-13.2.git] / ext / threads / t / thread.t
index 9a2a097..0cc59dc 100644 (file)
@@ -30,7 +30,7 @@ BEGIN {
     }
 
     $| = 1;
-    print("1..33\n");   ### Number of tests that will be run ###
+    print("1..34\n");   ### Number of tests that will be run ###
 };
 
 print("ok 1 - Loaded\n");
@@ -194,6 +194,14 @@ fresh_perl_is(<<'EOI', 'ok', { }, 'thread sub via $_[0]');
     print 'ok';
 EOI
 
+# [perl #45053]  Memory corruption from eval return in void context
+fresh_perl_is(<<'EOI', 'ok', { }, 'void eval return');
+    use threads;
+    threads->create(sub { eval '1' });
+    $_->join() for threads->list;
+    print 'ok';
+EOI
+
 # test CLONE_SKIP() functionality
 if ($] >= 5.008007) {
     my %c : shared;