mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Fix execute fuzzer on i386
Opcode handlers use the FASTCALL calling convention...
This commit is contained in:
parent
2c15c9ce80
commit
f0dfdca0ae
@ -22,6 +22,10 @@
|
||||
#define MAX_STEPS 1000
|
||||
static uint32_t steps_left;
|
||||
|
||||
/* Because the fuzzer is always compiled with clang,
|
||||
* we can assume that we don't use global registers / hybrid VM. */
|
||||
typedef int (ZEND_FASTCALL *opcode_handler_t)(zend_execute_data *);
|
||||
|
||||
void fuzzer_execute_ex(zend_execute_data *execute_data) {
|
||||
while (1) {
|
||||
int ret;
|
||||
@ -32,7 +36,7 @@ void fuzzer_execute_ex(zend_execute_data *execute_data) {
|
||||
zend_bailout();
|
||||
}
|
||||
|
||||
if ((ret = ((user_opcode_handler_t) EX(opline)->handler)(execute_data)) != 0) {
|
||||
if ((ret = ((opcode_handler_t) EX(opline)->handler)(execute_data)) != 0) {
|
||||
if (ret > 0) {
|
||||
execute_data = EG(current_execute_data);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user