This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix STRESS_REALLOC after 3caf0269d
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index 78a465b..55f801a 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -140,7 +140,11 @@ Perl_markstack_grow(pTHX)
 void
 Perl_savestack_grow(pTHX)
 {
+#ifdef STRESS_REALLOC
+    PL_savestack_max += SS_MAXPUSH;
+#else
     PL_savestack_max = GROW(PL_savestack_max);
+#endif
     /* Note that we allocate SS_MAXPUSH slots higher than ss_max
      * so that SS_ADD_END(), SSGROW() etc can do a simper check */
     Renew(PL_savestack, PL_savestack_max + SS_MAXPUSH, ANY);