diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-11-20 20:38:27 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-11-22 21:20:37 -0800 |
commit | 0ff725582ada84044c87936ed5498addbfbb2a5a (patch) | |
tree | 9ba96cde5d6fbe9ceee26dc0532ba2b1d3e30148 /perl.c | |
parent | 311e7a86faead444a320777010bb5b5464fe5f32 (diff) | |
download | perl-0ff725582ada84044c87936ed5498addbfbb2a5a.tar.gz |
Get perl to build under STRESS_REALLOC once more
It had been broken since v5.17.6-144-ga3444cc.
That commit added, inter alia, this comment to scope.h:
+ * Of course, doing the size check *after* pushing means we must always
+ * ensure there are SS_MAXPUSH free slots on the savestack
But STRESS_REALLOC makes the initial savestack size just 1, and
SS_MAXPUSH is 4. So ‘./miniperl -e0’ failed an assertion.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3995,8 +3995,10 @@ Perl_init_debugger(pTHX) #ifndef STRESS_REALLOC #define REASONABLE(size) (size) +#define REASONABLE_but_at_least(size,min) (size) #else #define REASONABLE(size) (1) /* unreasonable */ +#define REASONABLE_but_at_least(size,min) (min) #endif void @@ -4032,9 +4034,9 @@ Perl_init_stacks(pTHX) PL_scopestack_ix = 0; PL_scopestack_max = REASONABLE(32); - Newx(PL_savestack,REASONABLE(128),ANY); + Newx(PL_savestack,REASONABLE_but_at_least(128,SS_MAXPUSH),ANY); PL_savestack_ix = 0; - PL_savestack_max = REASONABLE(128); + PL_savestack_max = REASONABLE_but_at_least(128,SS_MAXPUSH); } #undef REASONABLE |