Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 14, 2023
1 parent 9cb8bcf commit d3bf88e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/opcache/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ if test "$PHP_OPCACHE" != "no"; then

JIT_CFLAGS="-I@ext_builddir@/jit/ir -D${IR_TARGET} -DIR_PHP"
if test "$ZEND_DEBUG" = "yes"; then
JIT_CFLAGS="${JIT_CFLAGS} -DIR_DEBUG -DIR_DEBUG_MESSAGES"
JIT_CFLAGS="${JIT_CFLAGS} -DIR_DEBUG"
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if (PHP_OPCACHE != "no") {

ADD_FLAG("CFLAGS_OPCACHE", "/I \"ext\\opcache\\jit\\ir\" /D "+ir_target+" /D IR_PHP");
if (PHP_DEBUG == "yes") {
ADD_FLAG("CFLAGS_OPCACHE", "/D IR_DEBUG /D IR_DEBUG_MESSAGES");
ADD_FLAG("CFLAGS_OPCACHE", "/D IR_DEBUG");
}

if (CHECK_HEADER_ADD_INCLUDE("capstone\\capstone.h", "CFLAGS_OPCACHE", PHP_OPCACHE+ ";" + PHP_PHP_BUILD + "\\include") &&
Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/jit/ir
Submodule ir updated 6 files
+6 −1 ir.c
+7 −0 ir.h
+20 −1 ir_aarch64.dasc
+2 −0 ir_emit_c.c
+8 −1 ir_main.c
+20 −1 ir_x86.dasc
3 changes: 2 additions & 1 deletion ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ uint32_t zend_jit_duplicate_exit_point(ir_ctx *ctx, zend_jit_trace_info *t, uint
uint32_t new_exit_point = t->exit_count;

if (new_exit_point >= ZEND_JIT_TRACE_MAX_EXITS) {
ZEND_ASSERT(0 && "ZEND_JIT_TRACE_MAX_EXITS");
ctx->status = -ZEND_JIT_TRACE_STOP_TOO_MANY_EXITS;
return exit_point;
}

t->exit_count++;
Expand Down

0 comments on commit d3bf88e

Please sign in to comment.