Skip to content

Commit f0dfdca

Browse files
committed
Fix execute fuzzer on i386
Opcode handlers use the FASTCALL calling convention...
1 parent 2c15c9c commit f0dfdca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sapi/fuzzer/fuzzer-execute.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#define MAX_STEPS 1000
2323
static uint32_t steps_left;
2424

25+
/* Because the fuzzer is always compiled with clang,
26+
* we can assume that we don't use global registers / hybrid VM. */
27+
typedef int (ZEND_FASTCALL *opcode_handler_t)(zend_execute_data *);
28+
2529
void fuzzer_execute_ex(zend_execute_data *execute_data) {
2630
while (1) {
2731
int ret;
@@ -32,7 +36,7 @@ void fuzzer_execute_ex(zend_execute_data *execute_data) {
3236
zend_bailout();
3337
}
3438

35-
if ((ret = ((user_opcode_handler_t) EX(opline)->handler)(execute_data)) != 0) {
39+
if ((ret = ((opcode_handler_t) EX(opline)->handler)(execute_data)) != 0) {
3640
if (ret > 0) {
3741
execute_data = EG(current_execute_data);
3842
} else {

0 commit comments

Comments
 (0)