if the GV it is pointing to gets freed.
p4raw-id: //depot/perl@30868
if (!SvVALID(sv) && GvSTASH(sv))
sv_del_backref((SV*)GvSTASH(sv), sv);
}
+ /* FIXME. There are probably more unreferenced pointers to SVs in the
+ interpreter struct that we should check and tidy in a similar
+ fashion to this: */
+ if ((GV*)sv == PL_last_in_gv)
+ PL_last_in_gv = NULL;
case SVt_PVMG:
case SVt_PVNV:
case SVt_PVIV: