Dmitry Stogov
f04a9f466f
Update IR
...
IR commit: 1a41bddcf0a41b9a3866d00b57591b3684c88443
2024-12-03 13:01:31 +03:00
Dmitry Stogov
03bb112fb2
Fix GH-16984: function JIT overflow bug ( #17015 )
2024-12-02 13:30:26 +03:00
Dmitry Stogov
5ed438fe07
Update IR
...
IR commit: 673308a039eed5a2fdf4a2783b3dd3d6010a8c19
2024-11-29 16:28:27 +03:00
Dmitry Stogov
6fca900cc7
Update IR
...
IR commit: 7c26e26126123beac8dbaf811d5eac8d789d584f
2024-11-29 02:39:33 +03:00
Dmitry Stogov
b89d7ff92a
Fix GH-16821: runtime error: member access within misaligned address when running phpseclib tests ( #16951 )
2024-11-27 00:43:45 +03:00
Niels Dossche
ed556939df
Extract call_level conditions out to separate functions ( #16949 )
...
These are repeated a couple of times, so centralise it in 2 functions to
reduce repetition and make updating this less error-prone.
2024-11-26 21:22:12 +01:00
Dmitry Stogov
d31de85f5f
Avoid possible spill conflict (one of the problem that caused GH-16821) ( #16947 )
2024-11-26 21:44:15 +03:00
Niels Dossche
de30ba5042
Fix GH-16879: JIT dead code skipping does not update call_level
...
We intend to execute `MATCH_ERROR` in the VM and return to trace a hot
function in BB1. We generate a tail handler and skip all remaining
oplines of BB0. That means the `INIT_FCALL` in BB0 is missed and
`call_level` is not increased to 1. This leads to the assertion
failure.
This patch fixes the issue by updating the `call_level` for the skipped
oplines.
Closes GH-16939.
2024-11-26 19:27:17 +01:00
Dmitry Stogov
7892a0ec8a
Fix GH-16913: 8.4 function JIT memory corruption ( #16943 )
...
with '#' will be ignored, and an empty message aborts the commit.
2024-11-26 16:59:57 +03:00
Niels Dossche
f4ca6d2794
Fix GH-16902: Set of opcache tests fail zts+aarch64 (8.4+)
...
Accompanying IR PR: https://github.com/dstogov/ir/pull/95
Closes GH-16924.
2024-11-25 19:51:01 +01:00
Dmitry Stogov
ba8e3e1d79
Update IR
...
IR commit: ff7ee6c1e6090ba0ba7b47cb77939518304fab6b
2024-11-25 10:29:41 +03:00
Christoph M. Becker
da81b5c8d2
Reapply "Merge branch 'PHP-8.3' into PHP-8.4"
...
This reverts commit 83ca37483c , and
fixes the previous bad merge.
2024-11-20 23:24:43 +01:00
Christoph M. Becker
83ca37483c
Revert "Merge branch 'PHP-8.3' into PHP-8.4"
...
This reverts commit ae62779386 , reversing
changes made to 19e685ecc4 .
This was a bad merge; I'll have a look shortly.
2024-11-20 19:45:36 +01:00
Christoph M. Becker
ae62779386
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16851: JIT_G(enabled) not set correctly on other threads
2024-11-20 19:14:57 +01:00
Christoph M. Becker
58ed759ba7
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-16851: JIT_G(enabled) not set correctly on other threads
2024-11-20 19:12:40 +01:00
Dylan K. Taylor
ff3b4eca0e
Fix GH-16851: JIT_G(enabled) not set correctly on other threads
...
There doesn't seem to be a thread post-startup hook that runs after
zend_startup_cb() that could be used for this
this fix is similar to accel_startup_ok() as seen here: fc1db70f10/ext/opcache/ZendAccelerator.c (L2631-L2634)
Closes GH-16853.
2024-11-20 19:11:44 +01:00
Dmitry Stogov
d0c336a666
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Use the immutable twin of temporary op_array (#16861 )
2024-11-19 20:55:40 +03:00
Dmitry Stogov
d1a9281814
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Use the immutable twin of temporary op_array (#16861 )
2024-11-19 20:55:32 +03:00
Dmitry Stogov
ef5844a1ca
Use the immutable twin of temporary op_array ( #16861 )
2024-11-19 20:55:15 +03:00
Dmitry Stogov
c6c3d9fa5a
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Backport JIT fix: set valid EX(opline) before calling gc_possible_root() (#16858 )
2024-11-19 18:04:15 +03:00
Dmitry Stogov
6167c64782
Backport JIT fix: set valid EX(opline) before calling gc_possible_root() ( #16858 )
2024-11-19 18:03:54 +03:00
Christoph M. Becker
e44b7625c5
Fix GH-16839: Error on building Opcache JIT for Windows ARM64
...
OPcache JIT does not support Windows ARM64, so we should not allow
`--enable-opcache-jit` in the first place.
Due to the way `ARG_ENABLE()` is handled on Windows, we do not attempt
to suppress the configure option, but just do not enable JIT when the
user attempts to, and adapt the help text.
Closes GH-16841.
2024-11-18 23:27:54 +01:00
Dmitry Stogov
997431dea2
JIT: Set valid EX(opline) before calling gc_possible_root()
2024-11-18 19:31:26 +03:00
Dmitry Stogov
159b71c0f4
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fixed test
2024-11-18 15:35:13 +03:00
Dmitry Stogov
5198bcc561
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fixed test
2024-11-18 15:35:09 +03:00
Dmitry Stogov
71403558d3
Fixed test
2024-11-18 15:34:55 +03:00
Dmitry Stogov
e55bf9a2ea
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16829: Segmentation fault with opcache.jit=tracing enabled on aarch64
2024-11-18 14:34:55 +03:00
Dmitry Stogov
5575703fb3
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-16829: Segmentation fault with opcache.jit=tracing enabled on aarch64
2024-11-18 14:34:42 +03:00
Dmitry Stogov
79aaeeafe5
Fix GH-16829: Segmentation fault with opcache.jit=tracing enabled on aarch64
2024-11-18 14:27:08 +03:00
Niels Dossche
4767c0626c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16770: Tracing JIT type mismatch when returning UNDEF
2024-11-14 22:34:12 +01:00
Niels Dossche
0bf74bf9d8
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-16770: Tracing JIT type mismatch when returning UNDEF
2024-11-14 22:34:05 +01:00
Niels Dossche
cbb3b9371d
Fix GH-16770: Tracing JIT type mismatch when returning UNDEF
...
When returning an UNDEF value, it actually becomes NULL.
The following code took this into account:
28344e0445/ext/opcache/jit/zend_jit_trace.c (L2196-L2199)
But the stack does not update the type to NULL, causing a mismatch.
Closes GH-16784.
Co-authored-by: Dmitry Stogov <dmitry@zend.com >
2024-11-14 22:33:06 +01:00
Dmitry Stogov
f6256fa2c0
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix incorrect handling of ZEND_ACC_FINAL flag in JIT (#16778 )
2024-11-13 14:43:43 +03:00
Dmitry Stogov
b9c6f07713
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix incorrect handling of ZEND_ACC_FINAL flag in JIT (#16778 )
2024-11-13 14:39:18 +03:00
Dmitry Stogov
19809a526b
Fix incorrect handling of ZEND_ACC_FINAL flag in JIT ( #16778 )
2024-11-13 14:38:54 +03:00
Dmitry Stogov
56381e8f1d
Update IR
...
IR commit: 23c188cff0594d3af23517537e74e9e3b9b7f120
2024-11-05 17:52:37 +03:00
Niels Dossche
38e1b0ac8c
Fix GH-16572: Incorrect result with reflection in low-trigger JIT
...
When a recursive call happens with invalid arguments, the maximum valid
arguments are computed and stored in `num_args`, but the RECV entry
block we jump to is `call_num_args` instead. This can skip argument
validation checks. Fix this by using `num_args` instead.
Closes GH-16575.
2024-10-28 19:31:52 +01:00
Niels Dossche
757781a142
Fix GH-16577: EG(strtod_state).freelist leaks with opcache.preload
...
This happens because on ZTS we execute `executor_globals_ctor` which reset the
`freelist` and `p5s` pointers, while on NTS we don't.
On NTS we can reuse the caches but on ZTS we can't, the easiest fix is
to call `zend_shutdown_strtod` when preloading is shut down.
This regressed in GH-13974 and therefore only exists in PHP 8.4 and
higher.
Closes GH-16602.
2024-10-28 19:30:52 +01:00
Ilija Tovilo
cd8ee4dad1
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix lineno in function redeclaration error
2024-10-22 15:06:06 +02:00
Ilija Tovilo
381e020edb
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix lineno in function redeclaration error
2024-10-22 15:05:29 +02:00
Ilija Tovilo
de7ef3fa66
Fix lineno in function redeclaration error
...
We were previously using the lineno of the first instruction, rather than the
start of the function itself.
Fixes GH-16509
Closes GH-16531
2024-10-22 15:04:20 +02:00
Dmitry Stogov
cfd954f5f9
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16499: [JIT] Undefined to null coercion issues for return
2024-10-21 14:51:41 +03:00
Dmitry Stogov
920e3d6b70
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-16499: [JIT] Undefined to null coercion issues for return
2024-10-21 14:51:31 +03:00
Dmitry Stogov
fe513655dc
Fix GH-16499: [JIT] Undefined to null coercion issues for return
2024-10-21 14:50:50 +03:00
Dmitry Stogov
8b5668efef
Fix invalid target opline with jit->reuse_ip active ( #16457 )
...
This is an alternative for #16440
2024-10-18 12:48:23 +03:00
Dmitry Stogov
c98c198623
Add test for GH-16355 (fixed by previous commit)
2024-10-17 17:37:52 +03:00
Dmitry Stogov
6896756929
Update IR
...
IR commit: abbdbf2ad7f66b02106f3b51602a21f10f508808
2024-10-17 17:31:47 +03:00
Dmitry Stogov
f68dcc5a1c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16393: Assertion failure in ext/opcache/jit/zend_jit.c:2897
2024-10-15 12:03:36 +03:00
Dmitry Stogov
dd45d85531
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-16393: Assertion failure in ext/opcache/jit/zend_jit.c:2897
2024-10-15 12:01:40 +03:00
Dmitry Stogov
bf786d0d28
Fix GH-16393: Assertion failure in ext/opcache/jit/zend_jit.c:2897
2024-10-15 12:00:59 +03:00