From b9d2ea5ba3215af3e27ecf994cfded2599a1d4d2 Mon Sep 17 00:00:00 2001 From: George Greer Date: Sun, 6 Feb 2011 11:47:21 -0500 Subject: [PATCH] Two Safefree() changes to make -DPERL_POISON builds work again. The poison exposes a failure in t/op/magic: panic: corrupt saved stack index at - line 6. FAILED at test 7 --- gv.c | 2 +- regcomp.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gv.c b/gv.c index 56f7df6..9a259e0 100644 --- a/gv.c +++ b/gv.c @@ -1085,7 +1085,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, GvMULTI_on(gv); } if (key != name) - Safefree((char *)key); + Safefree(key); if (!gv || gv == (const GV *)&PL_sv_undef) return NULL; diff --git a/regcomp.c b/regcomp.c index 5a50c5a..baa0813 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5819,7 +5819,8 @@ S_invlist_destroy(pTHX_ HV* const invlist) PERL_ARGS_ASSERT_INVLIST_DESTROY; if (list_ptr != NULL) { - Safefree(INT2PTR(UV *, SvUV(*list_ptr))); + UV *list = INT2PTR(UV *, SvUV(*list_ptr)); /* PERL_POISON needs lvalue */ + Safefree(list); } } -- 2.7.4