@@ -3011,11 +3011,26 @@ function gen_vm($def, $skel) {
3011
3011
out ($ f , "\t} \n" );
3012
3012
out ($ f , "#else \n" );
3013
3013
out ($ f , "\topline = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); \n" );
3014
- out ($ f , "\tif (EXPECTED(opline != NULL)) { \n" );
3015
- out ($ f , "\t\tret = EG(current_execute_data) != ex ? (int)(EG(current_execute_data)->prev_execute_data != ex) + 1 : 0; \n" );
3016
- out ($ f , "\t\tSAVE_OPLINE(); \n" );
3014
+
3015
+ out ($ f , "# ifdef ZEND_HIGH_HALF_KERNEL \n" );
3016
+ out ($ f , "\tif (UNEXPECTED((intptr_t)opline <= 0)) { \n" );
3017
+ out ($ f , "# else \n" );
3018
+ out ($ f , "\tif (UNEXPECTED(((uintptr_t)opline & ZEND_VM_ENTER_BIT))) { \n" );
3019
+ out ($ f , "# endif \n" );
3020
+ out ($ f , "\t\topline = (const zend_op*)((uintptr_t)opline & ~ZEND_VM_ENTER_BIT); \n" );
3021
+ out ($ f , "\t\tif (EXPECTED(opline)) { \n" );
3022
+ out ($ f , "\t\t\t/* ZEND_VM_ENTER() or ZEND_VM_LEAVE() */ \n" );
3023
+ out ($ f , "\t\t\tret = EG(current_execute_data) != ex ? (int)(EG(current_execute_data)->prev_execute_data != ex) + 1 : 0; \n" );
3024
+ out ($ f , "\t\t\texecute_data = EG(current_execute_data); \n" );
3025
+ out ($ f , "\t\t\tSAVE_OPLINE(); \n" );
3026
+ out ($ f , "\t\t} else { \n" );
3027
+ out ($ f , "\t\t\t/* ZEND_VM_RETURN() */ \n" );
3028
+ out ($ f , "\t\t\tret = -1; \n" );
3029
+ out ($ f , "\t\t} \n" );
3017
3030
out ($ f , "\t} else { \n" );
3018
- out ($ f , "\t\tret = -1; \n" );
3031
+ out ($ f , "\t\t/* ZEND_VM_CONTINUE() */ \n" );
3032
+ out ($ f , "\t\tSAVE_OPLINE(); \n" );
3033
+ out ($ f , "\t\tret = 0; \n" );
3019
3034
out ($ f , "\t} \n" );
3020
3035
out ($ f , "#endif \n" );
3021
3036
out ($ f , "#ifdef ZEND_VM_FP_GLOBAL_REG \n" );
0 commit comments