From f5e782ec2d0a4a6d01d95034bcde6f171d2f61c7 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Fri, 3 Oct 2025 16:06:59 +0100 Subject: [PATCH] Zend: use type uint32_t for ticks_count global --- Zend/zend_globals.h | 2 +- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index df84a3d0f6b..d43c60b9581 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -204,7 +204,7 @@ struct _zend_executor_globals { zend_execute_data *current_observed_frame; - int ticks_count; + uint32_t ticks_count; zend_long precision; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 3c3065e1568..34e58639c64 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -8006,7 +8006,7 @@ ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY, NUM) { USE_OPLINE - if ((uint32_t)++EG(ticks_count) >= opline->extended_value) { + if (++EG(ticks_count) >= opline->extended_value) { EG(ticks_count) = 0; if (zend_ticks_function) { SAVE_OPLINE(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 50870ce463d..cc8bc51a7f4 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3278,7 +3278,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV ZEND_TICKS_SPEC_HA { USE_OPLINE - if ((uint32_t)++EG(ticks_count) >= opline->extended_value) { + if (++EG(ticks_count) >= opline->extended_value) { EG(ticks_count) = 0; if (zend_ticks_function) { SAVE_OPLINE(); @@ -58798,7 +58798,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_CCONV ZEND_TICKS_SPEC_TAILCAL { USE_OPLINE - if ((uint32_t)++EG(ticks_count) >= opline->extended_value) { + if (++EG(ticks_count) >= opline->extended_value) { EG(ticks_count) = 0; if (zend_ticks_function) { SAVE_OPLINE();