Skip to content

Commit e50cd12

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. Closes GH-21667
1 parent 95e93b8 commit e50cd12

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
@@ -275,7 +275,9 @@ typedef size_t (*zend_write_func_t)(const char *str, size_t str_length);
275275
EG(bailout) = &__bailout; \
276276
if (SETJMP(__bailout)==0) {
277277
#define zend_catch \
278+
ZEND_ASSERT(EG(bailout) == &__bailout); \
278279
} else { \
280+
ZEND_ASSERT(EG(bailout) == &__bailout); \
279281
EG(bailout) = __orig_bailout;
280282
#define zend_end_try() \
281283
} \

0 commit comments

Comments
 (0)