Commit graph

5870 commits

Author SHA1 Message Date
Dmitry Stogov
e9e6eb714e Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error
2023-11-22 13:26:25 +03:00
Dmitry Stogov
6f355c6c79 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error
2023-11-22 13:26:07 +03:00
Dmitry Stogov
2d65d714a3 Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error 2023-11-22 13:19:10 +03:00
Dmitry Stogov
b50aa63a08 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-12747: Function JIT returns invalid error message for coalesce operator on invalid offset
2023-11-22 13:02:18 +03:00
Dmitry Stogov
f48ab6a66f Fixed GH-12747: Function JIT returns invalid error message for coalesce operator on invalid offset 2023-11-22 13:01:35 +03:00
Dmitry Stogov
d20c8496e9 Update according to IR changes 2023-11-22 12:13:29 +03:00
Dmitry Stogov
acda3af045 Update IR
IR commit: 18a3192604d9475cee833c6f94079d31015a9754
2023-11-22 12:12:42 +03:00
David Carlier
65b06e36b7 Merge branch 'PHP-8.3' 2023-11-21 21:02:59 +00:00
David Carlier
501f0f8b7d Merge branch 'PHP-8.2' into PHP-8.3 2023-11-21 21:02:10 +00:00
Muhammad Moinur Rahman
6be4ba9f90 Add host_cpu type for FreeBSD
In FreeBSD world x86_64 host type is identified as amd64 so add proper
checks for FreeBSD amd64 hosts.

Close GH-12736
2023-11-21 21:01:38 +00:00
Pengfei Li
f2706a8f30
JIT/AArch64: Fix an undefined symbol issue (#12687)
In AArch64 function `zend_jit_set_veneer()`, some debug code calls two
other functions `ir_disasm_find_symbol()` and `ir_disasm_add_symbol()`
defined in `ir_disasm.c`. However, `ir_disasm.c` is compiled under the
condition that capstone is available. This causes an undefined symbol
issue while loading `opcache.so` when JIT is triggered if PHP is built
without `--with-capstone`.

We find this issue on MacOS 12.5 if we build PHP with Clang 14. It does
not appear immediately when using other versions of toolchains because
of lazy binding. To reproduce this with Linux/GCC, we can disable lazy
binding by `export LD_BIND_NOW=1` before building PHP.

This fixes the issue by making the debug code conditionally compile.
2023-11-16 11:57:09 +03:00
Daniil Gentili
2ca142ecd8
Improve jit tests
Closes GH-12425
2023-11-14 20:09:27 +01:00
Dmitry Stogov
94f32df866 Fixed compilation warning 2023-11-14 12:22:38 +03:00
David CARLIER
cc2bf11951
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.
2023-11-13 12:42:45 +00:00
Dmitry Stogov
8349835e68 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:28:48 +03:00
Dmitry Stogov
db26aee801 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:27:11 +03:00
Dmitry Stogov
c60c2a0d67
Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660) 2023-11-13 13:26:17 +03:00
Dmitry Stogov
a1cd010b12 Fix mistakes introduced in 886dd7c06f 2023-11-10 01:18:19 +03:00
Dmitry Stogov
886dd7c06f Improve fix for GH-12512: JIT Assertion `info & (1 << type)' failed 2023-11-09 23:21:38 +03:00
Dmitry Stogov
524b134607 Fixed failure in generator related tests on Mac introduced by 8ef695795c 2023-11-08 13:06:15 +03:00
Dmitry Stogov
01f24bb708 Fix incorrect trace type inference in a false loop
Fixes oss-fuzz #63846
2023-11-08 11:19:52 +03:00
Dmitry Stogov
11f46117d0 IR Update
IR commit: 1eaf5531e5f728b9519190bcf7906c9c9c9168ec
2023-11-08 10:25:02 +03:00
Dmitry Stogov
b88d38787b Revert "Fix incorrect trace type inference in a false loop"
This reverts commit 7f06a9daa2.
2023-11-07 18:29:26 +03:00
Dmitry Stogov
7f06a9daa2 Fix incorrect trace type inference in a false loop
Fixes oss-fuzz #63846
2023-11-07 17:29:10 +03:00
Dmitry Stogov
8ef695795c Fixed GH-12623: Segmentation fault in ZEND_DO_UCALL_SPEC_RETVAL_USED_HANDLER 2023-11-07 16:15:22 +03:00
Dmitry Stogov
3a3d83625b Fixed IR construction
Fixes oss-fuzz #63857
2023-11-07 13:25:09 +03:00
Dmitry Stogov
a30d809290 Fixed incorrect dead edge elimination during IR construction
Fixes oss-fuzz #63931
2023-11-07 11:41:23 +03:00
Dmitry Stogov
fa59bbe662 Update IR
IR commit: ec588537889c84a4ec649a6f1aa9d7f1bfea7b4d
2023-11-07 11:40:11 +03:00
Dmitry Stogov
93ed314432 Fixed incorrect type stores 2023-11-06 15:20:26 +03:00
Dmitry Stogov
3844593bfb An attempt to fix GH-12512 2023-11-03 13:49:50 +03:00
Dmitry Stogov
4ee72a8dda Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Backport fix for HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag (#12591)
2023-11-03 10:55:33 +03:00
Dmitry Stogov
6bf4041398 Backport fix for HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag (#12591)
* Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag

This fixes GH-12527

* typo
2023-11-03 10:54:57 +03:00
Dmitry Stogov
77312d8ea1 Fixed assertion 2023-11-03 02:16:08 +03:00
Dmitry Stogov
7aa9ef7d12 Fixed incorrect type assumption
Fixes oss-fuzz #63809
2023-11-02 22:33:01 +03:00
Dmitry Stogov
1226fe027a Fixed codegeneration for ISSET_ISEMPTY_DIM
Fixes oss-fuzz #63805
2023-11-02 19:48:04 +03:00
Dmitry Stogov
1c95e227e9
Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag (#12591)
* Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag

This fixes GH-12527

* typo
2023-11-02 16:17:31 +03:00
Dmitry Stogov
4fce8c83bc Merge branch 'PHP-8.3'
* PHP-8.3:
  Don't JIT after fatal errors
2023-11-02 14:15:13 +03:00
Dmitry Stogov
83bbea7c5b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Don't JIT after fatal errors
2023-11-02 14:15:05 +03:00
Dmitry Stogov
bbf2fc99a3 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Don't JIT after fatal errors
2023-11-02 14:14:48 +03:00
Dmitry Stogov
77a497d56a Don't JIT after fatal errors 2023-11-02 14:14:12 +03:00
Dmitry Stogov
110cdd336a Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT
  ext/intl: change when the locale is invalid for the 8.1/8.2 serie.
2023-11-02 08:21:36 +03:00
Dmitry Stogov
22735b3ff5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT
  ext/intl: change when the locale is invalid for the 8.1/8.2 serie.
2023-11-02 08:15:50 +03:00
Dmitry Stogov
177a6f5d8a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT
2023-11-02 08:11:00 +03:00
Dmitry Stogov
798b9d097b Fixed GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT 2023-11-02 08:09:29 +03:00
Dmitry Stogov
1b846f89b9 Fixed GH-12584: Assertion `ctx->control' failed with new JIT and CALL
VM`
2023-11-01 17:19:17 +03:00
Dmitry Stogov
d7fc3ab07f Fixed GH-12585: Assertion t->stack_map[t->exit_info[exit_point].stack_offset + var].type == 4 2023-11-01 16:11:54 +03:00
Dmitry Stogov
aa7465a435 Fixed missed type store
Fixes oss-fuzz #63601
2023-11-01 14:26:01 +03:00
Dmitry Stogov
7fcbedd7df Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed inorrect QM_ASSIGN elimination
2023-11-01 09:55:51 +03:00
Dmitry Stogov
916fa73d80 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed inorrect QM_ASSIGN elimination
2023-11-01 09:55:37 +03:00
Dmitry Stogov
125dbb2c03 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed inorrect QM_ASSIGN elimination
2023-11-01 09:55:28 +03:00