Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sapi/fuzzer/fuzzer-execute-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ static zend_always_inline void fuzzer_step(void) {
static void (*orig_execute_ex)(zend_execute_data *execute_data);

static void fuzzer_execute_ex(zend_execute_data *execute_data) {

#ifdef ZEND_CHECK_STACK_LIMIT
if (UNEXPECTED(zend_call_stack_overflowed(EG(stack_limit)))) {
zend_call_stack_size_error();
/* No opline was executed before exception */
EG(opline_before_exception) = NULL;
/* Fall through to handle exception below. */
}
#endif /* ZEND_CHECK_STACK_LIMIT */

const zend_op *opline = EX(opline);

while (1) {
fuzzer_step();
opline = ((opcode_handler_t) opline->handler)(execute_data, opline);
Expand Down
Loading