summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/regcomp.h b/regcomp.h
index 1ef9d2daee..362a8ed0bd 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -767,9 +767,11 @@ re.pm, especially to the documentation.
if (re_debug_flags & RE_DEBUG_EXTRA_GPOS) x )
/* initialization */
-/* get_sv() can return NULL during global destruction. */
+/* get_sv() can return NULL during global destruction. re_debug_flags can get
+ * clobbered by a longjmp, so must be initialized */
#define GET_RE_DEBUG_FLAGS DEBUG_r({ \
SV * re_debug_flags_sv = NULL; \
+ re_debug_flags = 0; \
re_debug_flags_sv = get_sv(RE_DEBUG_FLAGS, 1); \
if (re_debug_flags_sv) { \
if (!SvIOK(re_debug_flags_sv)) \