Skip to content

Commit 392cb1d

Browse files
committed
zend_timeout is not a signal handler function
The 'int dummy' parameter to this function makes it appear that it was intended as a signal handler, but it is not being used as such. So remove the redundant parameter.
1 parent 4c8b68e commit 392cb1d

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

Zend/zend_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ ZEND_API zend_bool zend_is_executing(void);
297297

298298
ZEND_API void zend_set_timeout(zend_long seconds, int reset_signals);
299299
ZEND_API void zend_unset_timeout(void);
300-
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(int dummy);
300+
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void);
301301
ZEND_API zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type);
302302
ZEND_API zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string *lcname, int fetch_type);
303303

Zend/zend_execute_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
651651
ZVAL_UNDEF(fci->retval);
652652

653653
if (EG(timed_out)) {
654-
zend_timeout(0);
654+
zend_timeout();
655655
}
656656

657657
if (!EG(active)) {
@@ -1108,7 +1108,7 @@ ZEND_API int zend_eval_string_ex(const char *str, zval *retval_ptr, const char *
11081108

11091109
static void zend_set_timeout_ex(zend_long seconds, int reset_signals);
11101110

1111-
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(int dummy) /* {{{ */
1111+
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void) /* {{{ */
11121112
{
11131113
#if defined(PHP_WIN32)
11141114
# ifndef ZTS

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9208,7 +9208,7 @@ ZEND_VM_HELPER(zend_interrupt_helper, ANY, ANY)
92089208
EG(vm_interrupt) = 0;
92099209
SAVE_OPLINE();
92109210
if (EG(timed_out)) {
9211-
zend_timeout(0);
9211+
zend_timeout();
92129212
} else if (zend_interrupt_function) {
92139213
zend_interrupt_function(execute_data);
92149214
ZEND_VM_ENTER();

Zend/zend_vm_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2838,7 +2838,7 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_interrupt_he
28382838
EG(vm_interrupt) = 0;
28392839
SAVE_OPLINE();
28402840
if (EG(timed_out)) {
2841-
zend_timeout(0);
2841+
zend_timeout();
28422842
} else if (zend_interrupt_function) {
28432843
zend_interrupt_function(execute_data);
28442844
ZEND_VM_ENTER();

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,8 +1612,7 @@ static int zend_jit_interrupt_handler_stub(dasm_State **Dst)
16121612
| //if (EG(timed_out)) {
16131613
| MEM_OP2_1_ZTS cmp, byte, executor_globals, timed_out, 0, r0
16141614
| je >1
1615-
| //zend_timeout(0);
1616-
| xor FCARG1d, FCARG1d
1615+
| //zend_timeout();
16171616
| EXT_CALL zend_timeout, r0
16181617
|1:
16191618
| //} else if (zend_interrupt_function) {

0 commit comments

Comments
 (0)