diff --git a/.github/scripts/download-bundled/jit-ir.patch b/.github/scripts/download-bundled/jit-ir.patch new file mode 100644 index 000000000000..6814cb162111 --- /dev/null +++ b/.github/scripts/download-bundled/jit-ir.patch @@ -0,0 +1,22 @@ +diff --git a/ext/opcache/jit/ir/ir_fold.h b/ext/opcache/jit/ir/ir_fold.h +index c5fd2f28894..fae3b4b4655 100644 +--- a/ext/opcache/jit/ir/ir_fold.h ++++ b/ext/opcache/jit/ir/ir_fold.h +@@ -1841,7 +1841,7 @@ IR_FOLD(REPLACE(LONG_CONST, _)) + && IR_IS_CONST_REF(op2) + && IR_IS_TYPE_INT(op2_insn->type) + && op2_insn->val.i64 >= 0 +- && op2_insn->val.i64 < IR_VECTOR_LENGTH(op1_insn->type)) { ++ && op2_insn->val.i64 < (int64_t)IR_VECTOR_LENGTH(op1_insn->type)) { + IR_ASSERT(IR_IS_TYPE_VECTOR(op1_insn->type) + && (IR_VECTOR_BASE_TYPE(op1_insn->type) == op3_insn->type + || (IR_IS_TYPE_INT(IR_VECTOR_BASE_TYPE(op1_insn->type)) +@@ -1943,7 +1943,7 @@ IR_FOLD(EXTRACT(LONG_CONST, _)) + if (IR_IS_CONST_REF(op2) + && IR_IS_TYPE_INT(op2_insn->type) + && op2_insn->val.i64 >= 0 +- && op2_insn->val.i64 < IR_VECTOR_LENGTH(op1_insn->type)) { ++ && op2_insn->val.i64 < (int64_t)IR_VECTOR_LENGTH(op1_insn->type)) { + uint32_t idx = op2_insn->val.u32; + void *ptr; + diff --git a/.github/scripts/download-bundled/jit-ir.sh b/.github/scripts/download-bundled/jit-ir.sh index fed7a9938d21..e1eae8eb8fa0 100755 --- a/.github/scripts/download-bundled/jit-ir.sh +++ b/.github/scripts/download-bundled/jit-ir.sh @@ -35,3 +35,6 @@ rm ir_mem2ssa.c # add extra files git restore README + +# patch customized files +git apply -v ../../../../.github/scripts/download-bundled/jit-ir.patch diff --git a/ext/opcache/jit/ir/ir_fold.h b/ext/opcache/jit/ir/ir_fold.h index c5fd2f288947..fae3b4b46552 100644 --- a/ext/opcache/jit/ir/ir_fold.h +++ b/ext/opcache/jit/ir/ir_fold.h @@ -1841,7 +1841,7 @@ IR_FOLD(REPLACE(LONG_CONST, _)) && IR_IS_CONST_REF(op2) && IR_IS_TYPE_INT(op2_insn->type) && op2_insn->val.i64 >= 0 - && op2_insn->val.i64 < IR_VECTOR_LENGTH(op1_insn->type)) { + && op2_insn->val.i64 < (int64_t)IR_VECTOR_LENGTH(op1_insn->type)) { IR_ASSERT(IR_IS_TYPE_VECTOR(op1_insn->type) && (IR_VECTOR_BASE_TYPE(op1_insn->type) == op3_insn->type || (IR_IS_TYPE_INT(IR_VECTOR_BASE_TYPE(op1_insn->type)) @@ -1943,7 +1943,7 @@ IR_FOLD(EXTRACT(LONG_CONST, _)) if (IR_IS_CONST_REF(op2) && IR_IS_TYPE_INT(op2_insn->type) && op2_insn->val.i64 >= 0 - && op2_insn->val.i64 < IR_VECTOR_LENGTH(op1_insn->type)) { + && op2_insn->val.i64 < (int64_t)IR_VECTOR_LENGTH(op1_insn->type)) { uint32_t idx = op2_insn->val.u32; void *ptr;