Skip to content

Commit 2f1a94e

Browse files
committed
Add EG(bailout) consistency assertion
Make sure EG(bailout) is what we expect. This will detect faulty jumps into or out of zend_try blocks, as in 38628e8.
1 parent 961355c commit 2f1a94e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Zend/zend.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
281281
EG(bailout) = &__bailout; \
282282
if (SETJMP(__bailout)==0) {
283283
#define zend_catch \
284+
ZEND_ASSERT(EG(bailout) == &__bailout); \
284285
} else { \
286+
ZEND_ASSERT(EG(bailout) == &__bailout); \
285287
EG(bailout) = __orig_bailout;
286288
#define zend_end_try() \
287289
} \

0 commit comments

Comments
 (0)