diff options
author | Vincent Pit <perl@profvince.com> | 2012-09-16 16:44:13 +0200 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2012-09-16 16:44:13 +0200 |
commit | 72581b5b7341e76b3ea364b4d49c8340bb668228 (patch) | |
tree | 12ff0fb664f105cd31aa78951d000b93b4cd9b39 | |
parent | 22ade07d6a4f442c7a3e970195597fd0cb266e0d (diff) | |
download | perl-72581b5b7341e76b3ea364b4d49c8340bb668228.tar.gz |
Fix perl with -DPERL_POISON after commit 22ade07
The third argument to PoisonNew is the type, not the size. Also, poisoning
the contents of the sv itself is incorrect.
-rw-r--r-- | scope.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -160,12 +160,9 @@ Perl_free_tmps(pTHX) /* XXX should tmps_floor live in cxstack? */ const I32 myfloor = PL_tmps_floor; while (PL_tmps_ix > myfloor) { /* clean up after last statement */ -#ifdef PERL_POISON - SV* const sv = PL_tmps_stack[PL_tmps_ix]; - PoisonWith(sv, 1, sizeof(SV *), 0xAB); - PL_tmps_ix--; -#else SV* const sv = PL_tmps_stack[PL_tmps_ix--]; +#ifdef PERL_POISON + PoisonWith(PL_tmps_stack + PL_tmps_ix + 1, 1, SV *, 0xAB); #endif if (sv && sv != &PL_sv_undef) { SvTEMP_off(sv); |