Skip to content

Commit f096087

Browse files
alexdowadnikic
authored andcommitted
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 53f5cfd commit f096087

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ ZEND_API int zend_eval_string_ex(const char *str, zval *retval_ptr, const char *
11041104

11051105
static void zend_set_timeout_ex(zend_long seconds, int reset_signals);
11061106

1107-
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(int dummy) /* {{{ */
1107+
ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void) /* {{{ */
11081108
{
11091109
#if defined(PHP_WIN32)
11101110
# 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)