In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/e7e69c85c7e8e0cb75b831e606ad4f26f18b11ff?hp=a155eb055a920e456f1b3a516de544bdf104322e>
- Log ----------------------------------------------------------------- commit e7e69c85c7e8e0cb75b831e606ad4f26f18b11ff Author: Nicolas R <[email protected]> Date: Mon Oct 31 11:53:17 2016 -0600 Avoid a segfault when untying an object Check if the tied object has a stash set before calling UNTIE method. ----------------------------------------------------------------------- Summary of changes: pp_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp_sys.c b/pp_sys.c index 672e7de08e..6d4dd86b7f 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1017,7 +1017,7 @@ PP(pp_untie) if ((mg = SvTIED_mg(sv, how))) { SV * const obj = SvRV(SvTIED_obj(sv, mg)); - if (obj) { + if (obj && SvSTASH(obj)) { GV * const gv = gv_fetchmethod_autoload(SvSTASH(obj), "UNTIE", FALSE); CV *cv; if (gv && isGV(gv) && (cv = GvCV(gv))) { -- Perl5 Master Repository
