See ticket #116064.
File::Glob and ::DosGlob free data associated with a calling op when
that op is freed.
During global destruction, there is no need to do that, as it will be
freed anyway.
Also, during sv_clean_all dMY_CXT can cause us to read freed memory.
static void
glob_ophook(pTHX_ OP *o)
{
+ if (PL_dirty) return;
+ {
dMY_CXT;
if (!MY_CXT.x_DG_ENTRIES)
MY_CXT.x_DG_ENTRIES = get_hv("File::DosGlob::entries", 0);
if (MY_CXT.x_DG_ENTRIES)
hv_delete(MY_CXT.x_DG_ENTRIES, (char *)&o, sizeof(OP *),G_DISCARD);
if (MY_CXT.x_DG_OLD_OPHOOK) MY_CXT.x_DG_OLD_OPHOOK(aTHX_ o);
+ }
}
MODULE = File::DosGlob PACKAGE = File::DosGlob
static void
glob_ophook(pTHX_ OP *o)
{
+ if (PL_dirty) return;
+ {
dMY_CXT;
if (MY_CXT.x_GLOB_ENTRIES
&& (o->op_type == OP_GLOB || o->op_type == OP_ENTERSUB))
hv_delete(MY_CXT.x_GLOB_ENTRIES, (char *)&o, sizeof(OP *),
G_DISCARD);
if (MY_CXT.x_GLOB_OLD_OPHOOK) MY_CXT.x_GLOB_OLD_OPHOOK(aTHX_ o);
+ }
}
MODULE = File::Glob PACKAGE = File::Glob