with PERL_DESTRUCT_LEVEL=2.
p4raw-id: //depot/perl@28378
: sv_type == SVt_PVAV ? "@"
: sv_type == SVt_PVHV ? "%"
: ""), name);
+ GV *gv;
if (USE_UTF8_IN_NAMES)
SvUTF8_on(err);
qerror(err);
- stash = GvHV(gv_fetchpvn_flags("<none>::", 8, GV_ADDMULTI, SVt_PVHV));
+ gv = gv_fetchpvn_flags("<none>::", 8, GV_ADDMULTI, SVt_PVHV);
+ if(!gv) {
+ /* symbol table under destruction */
+ return NULL;
+ }
+ stash = GvHV(gv);
}
else
return NULL;
#define DEBUG_TRIE_COMPILE_MORE_r(x) \
DEBUG_TRIE_COMPILE_r( if (SvIV(re_debug_flags) & RE_DEBUG_TRIE_MORE) x )
+/* get_sv() can return NULL during global destruction. */
#define GET_RE_DEBUG_FLAGS DEBUG_r( \
re_debug_flags=get_sv(RE_DEBUG_FLAGS, 1); \
- if (!SvIOK(re_debug_flags)) { \
+ if (re_debug_flags && !SvIOK(re_debug_flags)) { \
sv_setiv(re_debug_flags, RE_DEBUG_COMPILE | RE_DEBUG_EXECUTE ); \
} \
)