This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Assume we have sane C89 memcmp()
[perl5.git] / cop.h
diff --git a/cop.h b/cop.h
index be23b3d..34ebbc0 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -35,9 +35,7 @@ struct jmpenv {
     int                        je_ret;         /* last exception thrown */
     bool               je_mustcatch;   /* need to call longjmp()? */
     U16                 je_old_delaymagic; /* saved PL_delaymagic */
-#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
     SSize_t             je_old_stack_hwm;
-#endif
 };
 
 typedef struct jmpenv JMPENV;
@@ -47,7 +45,8 @@ typedef struct jmpenv JMPENV;
 #  define JE_OLD_STACK_HWM_save(je)  \
         (je).je_old_stack_hwm = PL_curstackinfo->si_stack_hwm
 #  define JE_OLD_STACK_HWM_restore(je)  \
-        PL_curstackinfo->si_stack_hwm = (je).je_old_stack_hwm
+        if (PL_curstackinfo->si_stack_hwm < (je).je_old_stack_hwm) \
+            PL_curstackinfo->si_stack_hwm = (je).je_old_stack_hwm
 #else
 #  define JE_OLD_STACK_HWM_zero        NOOP
 #  define JE_OLD_STACK_HWM_save(je)    NOOP