(Well, at least no more coredump.)
p4raw-id: //depot/perl@20630
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
RETPUSHYES;
- if ((mg = SvTIED_mg(sv, how))) {
+ if ((mg = SvTIED_mg(sv, how)) && mg->mg_obj) {
SV *obj = SvRV(mg->mg_obj);
GV *gv;
CV *cv = NULL;
print $s, "\n";
EXPECT
SCALAR SCALAR SCALAR SCALAR
+########
+# [perl #23287] segfault in untie
+sub TIESCALAR { bless $_[1], $_[0] }
+my $var;
+tie $var, 'main', \$var;
+untie $var;
+EXPECT