From: George Greer Date: Sun, 6 Feb 2011 16:47:21 +0000 (-0500) Subject: Two Safefree() changes to make -DPERL_POISON builds work again. X-Git-Tag: accepted/trunk/20130322.191538~5768 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9d2ea5ba3215af3e27ecf994cfded2599a1d4d2;p=platform%2Fupstream%2Fperl.git 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 --- 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); } }