From 72581b5b7341e76b3ea364b4d49c8340bb668228 Mon Sep 17 00:00:00 2001 From: Vincent Pit Date: Sun, 16 Sep 2012 16:44:13 +0200 Subject: [PATCH] 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. --- scope.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scope.c b/scope.c index 42e3af8..eabdbd2 100644 --- a/scope.c +++ b/scope.c @@ -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); -- 2.7.4