Dmitry Stogov
c010e8fb02
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix GH-10271: Incorrect arithmetic calculations when using JIT
2023-01-16 14:52:14 +03:00
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
Christoph M. Becker
c8955c078a
Revert GH-10220
...
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816 >.
This reverts commit ecc880f491 .
This reverts commit 588a07f737 .
This reverts commit f377e15751 .
This reverts commit b4ba16fe18 .
This reverts commit 694ec1deea .
This reverts commit 6b34de8eba .
This reverts commit aa1cd02a43 .
This reverts commit 308fd311ea .
This reverts commit 16203b53e1 .
This reverts commit 738fb5ca54 .
This reverts commit 9fdbefacd3 .
This reverts commit cd4a7c1d90 .
This reverts commit 928685eba2 .
This reverts commit 01e5ffc85c .
2023-01-16 12:27:33 +01:00
Max Kellermann
308fd311ea
ext/{standard,json,random,...}: add missing includes
2023-01-10 14:19:03 +00:00
Dmitry Stogov
f8b9312709
Merge branch 'PHP-8.2'
...
* PHP-8.2:
ext/opcache/jit/zend_jit_trace: fix memory leak in _compile_root_trace() (#10146 )
2023-01-09 09:51:12 +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
Max Kellermann
efd5ecb0f2
Zend/Optimizer/zend_inference: make several pointers const
...
This allows removing several deconst casts from the JIT.
2023-01-04 12:59:16 +00:00
David Carlier
383053c4aa
Merge branch 'PHP-8.2'
2022-12-29 12:22:21 +00: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
Dmitry Stogov
ca5f668f7c
Added missed return
2022-12-29 12:40:46 +03:00
David Carlier
f7a28c4145
Merge branch 'PHP-8.2'
2022-12-26 21:19:23 +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
c46a0ce198
Merge branch 'PHP-8.2'
...
* PHP-8.2:
[ci skip] NEWS
[ci skip] NEWS
ext/opcache/jit/zend_jit: fix inverted bailout value in zend_runtime_jit() (#10144 )
2022-12-21 14:56:26 +01: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
Arnaud Le Blanc
a11c8a3039
Limit stack size ( #9104 )
2022-12-16 17:44:26 +01:00
Dmitry Stogov
a6a80d8ab2
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix memory leak
2022-11-14 12:36:00 +03: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
Ilija Tovilo
6e5b989886
Remove unused PHP 8.1 BC layer in JIT ( #9937 )
2022-11-11 20:03:53 +01: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