@@ -310,7 +310,7 @@ typedef struct _zend_jit_registers_buf {
310
310
#define ZEND_JIT_EXIT_POINTS_SPACING 4 // push byte + short jmp = bytes
311
311
#define ZEND_JIT_EXIT_POINTS_PER_GROUP 32 // number of continuous exit points
312
312
313
- static uint32_t zend_jit_exit_point_by_addr(void *addr);
313
+ static uint32_t zend_jit_exit_point_by_addr(const void *addr);
314
314
int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf *regs);
315
315
316
316
static int zend_jit_assign_to_variable(zend_jit_ctx *jit,
@@ -358,7 +358,7 @@ static const void *zend_jit_get_veneer(ir_ctx *ctx, const void *addr)
358
358
359
359
if (((zend_jit_ctx*)ctx)->trace
360
360
&& (void*)addr >= dasm_buf && (void*)addr < dasm_end) {
361
- uint32_t exit_point = zend_jit_exit_point_by_addr((void*) addr);
361
+ uint32_t exit_point = zend_jit_exit_point_by_addr(addr);
362
362
363
363
if (exit_point != (uint32_t)-1) {
364
364
zend_jit_trace_info *t = ((zend_jit_ctx*)ctx)->trace;
@@ -375,7 +375,11 @@ static bool zend_jit_set_veneer(ir_ctx *ctx, const void *addr, const void *venee
375
375
{
376
376
int i, count = sizeof(zend_jit_stubs) / sizeof(zend_jit_stubs[0]);
377
377
int64_t offset;
378
+ uint32_t exit_point = zend_jit_exit_point_by_addr(addr);
378
379
380
+ if (exit_point != (uint32_t)-1) {
381
+ return 1;
382
+ }
379
383
for (i = 0; i < count; i++) {
380
384
if (zend_jit_stub_handlers[i] == addr) {
381
385
const void **ptr = (const void**)&zend_jit_stub_handlers[count + i];
0 commit comments