Dmitry Stogov
757e269b89
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix GH-10271: Incorrect arithmetic calculations when using JIT
2023-01-16 14:51:42 +03:00
Dmitry Stogov
42eed7bb4e
Fix GH-10271: Incorrect arithmetic calculations when using JIT
2023-01-16 14:51:26 +03:00
Dmitry Stogov
d13b3b6aa7
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
ext/opcache/jit/zend_jit_trace: fix memory leak in _compile_root_trace() (#10146 )
2023-01-09 09:51:00 +03:00
Max Kellermann
bcc5d268f6
ext/opcache/jit/zend_jit_trace: fix memory leak in _compile_root_trace() ( #10146 )
...
A copy of this piece of code exists in zend_jit_compile_side_trace(),
but there, the leak bug does not exist.
This bug exists since both copies of this piece of code were added in
commit 4bf2d09ede
2023-01-09 09:50:30 +03:00
David Carlier
07bf42df41
Merge branch 'PHP-8.1' into PHP-8.2
2022-12-29 12:21:13 +00:00
Max Kellermann
e217138b40
ext/opcache/jit/zend_jit_trace: add missing lock for EXIT_INVALIDATE
...
Commit 6c25413183 added the flag ZEND_JIT_EXIT_INVALIDATE which
resets the trace handlers in zend_jit_trace_exit(), but forgot to
lock the shared memory section.
This could cause another worker process who still saw the
ZEND_JIT_TRACE_JITED flag to schedule ZEND_JIT_TRACE_STOP_LINK, but
when it arrived at the ZEND_JIT_DEBUG_TRACE_STOP, the handler was
already reverted by the first worker process and thus
zend_jit_find_trace() fails.
This in turn generated a bogus jump offset in the JITed code, crashing
the PHP process.
2022-12-29 12:20:56 +00:00
David Carlier
381d0ddc20
Merge branch 'PHP-8.1' into PHP-8.2
2022-12-26 21:18:31 +00:00
Max Kellermann
b26b758952
ext/opcache/jit: handle zend_jit_find_trace() failures
...
Commit 6c25413 added the flag ZEND_JIT_EXIT_INVALIDATE which resets
the trace handlers in zend_jit_trace_exit(), but forgot to consider
that on ZEND_JIT_TRACE_STOP_LINK, this changed handler gets passed to
zend_jit_find_trace(), causing it to fail, either by returning 0
(results in bogus data) or by aborting due to ZEND_UNREACHABLE(). In
either case, this crashes the PHP process.
I'm not quite sure how to fix this multi-threading problem properly;
my suggestion is to just fail the zend_jit_trace() call. After all,
the whole ZEND_JIT_EXIT_INVALIDATE fix was about reloading modified
scripts, so there's probably no point in this pending zend_jit_trace()
call.
2022-12-26 21:17:19 +00:00
Arnaud Le Blanc
f1c345394b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[ci skip] NEWS
ext/opcache/jit/zend_jit: fix inverted bailout value in zend_runtime_jit() (#10144 )
2022-12-21 14:55:36 +01:00
Max Kellermann
d3a6eedf4a
ext/opcache/jit/zend_jit: fix inverted bailout value in zend_runtime_jit() ( #10144 )
...
In the "catch" block, do_bailout must be set to true, not false, or
else zend_bailout() never gets called.
2022-12-21 14:53:21 +01:00
Dmitry Stogov
6cbc91151a
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix memory leak
2022-11-14 12:35:49 +03:00
Dmitry Stogov
a8bd342397
Fix memory leak
...
Fizes oss-fuzz #53143
2022-11-14 12:35:09 +03:00
Dmitry Stogov
6567d49726
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
opcache: fix syntax error introduced in 261a08af65 (#9821 )
2022-10-24 20:43:18 +03:00
Kévin Dunglas
af75eaf9bf
opcache: fix syntax error introduced in 261a08af65 ( #9821 )
2022-10-24 20:42:55 +03:00
Dmitry Stogov
17706c3e88
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
JIT: Fix incorrect EX(opline) override
2022-10-24 12:03:36 +03:00
Dmitry Stogov
261a08af65
JIT: Fix incorrect EX(opline) override
...
Fixes oss-fuzz #52674
2022-10-24 12:02:28 +03:00
Dmitry Stogov
d282345e11
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Reset JIT for dynamic functions on opcache restrart
2022-10-17 11:27:12 +03:00
Dmitry Stogov
61e563ca40
Reset JIT for dynamic functions on opcache restrart
2022-10-17 11:26:30 +03:00
Dmitry Stogov
5e10aa4e5f
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Discard disasm symbols on opcache restart
2022-10-17 11:24:08 +03:00
Dmitry Stogov
3e076ddf06
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Discard disasm symbols on opcache restart
2022-10-17 11:24:00 +03:00
Dmitry Stogov
cefb228e15
Discard disasm symbols on opcache restart
2022-10-17 11:22:59 +03:00
Dmitry Stogov
46fcf33c7b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix crashes after opcache restart
2022-10-11 14:23:59 +03:00
Dmitry Stogov
c5364b851a
Fix crashes after opcache restart
2022-10-11 14:23:12 +03:00
Dmitry Stogov
5cfec7ee40
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix typo
2022-10-05 21:39:46 +03:00
Dmitry Stogov
e81b6bf018
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix typo
2022-10-05 21:39:37 +03:00
Dmitry Stogov
072dc3c857
Fix typo
2022-10-05 21:39:16 +03:00
Dmitry Stogov
4164d2d567
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix register allocation (missing store)
2022-10-03 17:09:07 +03:00
Dmitry Stogov
5877b84056
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix register allocation (missing store)
2022-10-03 17:09:01 +03:00
Dmitry Stogov
ed652a514f
Fix register allocation (missing store)
...
This fixes oss-fuzz #52022
2022-10-03 17:08:11 +03:00
Dmitry Stogov
ec5882e1c3
Fix GH-9626: JIT type assertion failure in Symfony community build
2022-10-03 14:58:37 +03:00
Dmitry Stogov
3cce4964d1
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix abstract trace consisency for FE_FETCH instruction
2022-10-03 14:51:32 +03:00
Dmitry Stogov
da28a6b497
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix abstract trace consisency for FE_FETCH instruction
2022-10-03 14:51:21 +03:00
Dmitry Stogov
5ca4113386
Fix abstract trace consisency for FE_FETCH instruction
2022-10-03 14:48:03 +03:00
Dmitry Stogov
efcffc9d5f
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Force exit to VM
2022-09-29 15:28:23 +03:00
Dmitry Stogov
aa179bf3dd
Force exit to VM
2022-09-29 15:27:38 +03:00
Ilija Tovilo
980c2edbe2
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix invalid label before }
2022-09-27 23:28:07 +02:00
Ilija Tovilo
0aa5adb143
Fix invalid label before }
...
Will be fixed in C23 :)
Closes GH-9624
2022-09-27 23:27:17 +02:00
Dmitry Stogov
8dc689ecfd
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Wrap JIT compiler with zend_try to recover in case of memory overflow
2022-09-27 22:29:01 +03:00
Dmitry Stogov
2568db287d
Wrap JIT compiler with zend_try to recover in case of memory overflow
2022-09-27 22:28:16 +03:00
Dmitry Stogov
ca93e48b77
Uniform placing of init_fcall guards.
...
This fixes trcing JIT with opcache.jit=51
2022-09-27 11:30:36 +03:00
Dmitry Stogov
95d9e5157f
Check "ssa_op" before dereference (it may be NULL for opcache.jit=51)
2022-09-23 13:14:07 +03:00
David Carlier
fd55b50833
Merge branch 'PHP-8.1' into PHP-8.2
2022-09-22 11:24:37 +01:00
wxue1
52f4ed16e0
Indirect call reduction for Jit code
...
Changing indirect call to direct call for Jit code
benefits the branch prediction, which gets 1% performance
gain in our workload.
Similarly, we change indirect jump to direct jump.
Signed-off-by: Su, Tao <tao.su@intel.com >
Signed-off-by: Wang, Xue <xue1.wang@intel.com >
2022-09-22 11:22:27 +01:00
Arnaud Le Blanc
3c852cf43f
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Check return value of zend_jit_trace_get_exit_addr() (#9097 )
2022-09-09 10:51:10 +02:00
Arnaud Le Blanc
466e4dc2a2
Check return value of zend_jit_trace_get_exit_addr() ( #9097 )
2022-09-09 10:50:03 +02:00
Dmitry Stogov
4b884bedc8
JIT: Fix missing type store
...
Fixes oss-fuzz #50653
2022-08-29 14:36:16 +03:00
Dmitry Stogov
2f9bc6e37a
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix ext/opcache/tests/jit/inc_obj_004.phpt failure introduced by fd74ee7e90
2022-08-29 12:36:06 +03:00
Dmitry Stogov
a516e2992d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix ext/opcache/tests/jit/inc_obj_004.phpt failure introduced by fd74ee7e90
2022-08-29 12:35:46 +03:00
Dmitry Stogov
ce42dcf483
Fix ext/opcache/tests/jit/inc_obj_004.phpt failure introduced by fd74ee7e90
...
This should fix GH-9445
2022-08-29 12:30:14 +03:00
Ilija Tovilo
3264f2367d
Fix strict-prototypes warning
2022-08-26 13:57:39 +02:00