#
b3e28e22 |
| 12-Mar-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix module shutdown crash during ZTS JIT shutdown Commit a21195650e53 fixed a leak by adding a TSRM destructor for the JIT globals in ZTS mode. In case the main thread shuts down the TSR
Fix module shutdown crash during ZTS JIT shutdown Commit a21195650e53 fixed a leak by adding a TSRM destructor for the JIT globals in ZTS mode. In case the main thread shuts down the TSRM, it will call all the destructors. The JIT globals destructor will be invoked, but will always access the main thread globals using JIT_G. This means that instead of freeing the JIT globals in the different threads, the one in the main thread is freed repeatedly over and over, crashing PHP. Fix it by always passing the pointer instead of relying on JIT_G. Closes GH-10835.
show more ...
|
#
131b862a |
| 07-Feb-2023 |
Max Kellermann |
ext/opcache/zend_jit: call TSRM dtor before unloading opcache.so (#10533) Commit a21195650e53e added a TSRM destructor, but that destructor will get called by tsrm_shutdown(), which is a
ext/opcache/zend_jit: call TSRM dtor before unloading opcache.so (#10533) Commit a21195650e53e added a TSRM destructor, but that destructor will get called by tsrm_shutdown(), which is after opcache.so has already been unloaded, resulting in a shutdown crash, e.g.: #0 0x00007fad01737500 in ?? () #1 0x000055ac54e723c4 in tsrm_shutdown () at TSRM/TSRM.c:194 #2 0x000055ac54c42180 in main (argc=80, argv=0x55ac57bc14d0) at sapi/cli/php_cli.c:1388 By calling ts_free_id() before opcache.so gets unloaded, we can easily fix this crash bug.
show more ...
|
#
afbb28df |
| 07-Feb-2023 |
Max Kellermann |
ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527) * ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types Regression by commit a2119
ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types (#10527) * ext/opcache/zend_jit: cast function to fix -Wincompatible-pointer-types Regression by commit a21195650e53e34266806a8c379dd5a91f0dbb61 * TSRM/win32: fix ts_allocate_dtor cast The dtor was casted to ts_allocate_ctor; luckily, ts_allocate_dtor and ts_allocate_ctor just happen to be the same type.
show more ...
|
#
a2119565 |
| 06-Feb-2023 |
Dmitry Stogov |
Fix possible exit_counters memory leak in ZTS build
|
#
d3a6eedf |
| 21-Dec-2022 |
Max Kellermann |
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 cal
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.
show more ...
|
#
61e563ca |
| 17-Oct-2022 |
Dmitry Stogov |
Reset JIT for dynamic functions on opcache restrart
|
#
cefb228e |
| 17-Oct-2022 |
Dmitry Stogov |
Discard disasm symbols on opcache restart
|
#
c5364b85 |
| 11-Oct-2022 |
Dmitry Stogov |
Fix crashes after opcache restart
|
#
2568db28 |
| 27-Sep-2022 |
Dmitry Stogov |
Wrap JIT compiler with zend_try to recover in case of memory overflow
|
#
e787d9a0 |
| 18-Aug-2022 |
David CARLIER |
GH-9370: Fix opcache jit protection bits. Allow mprotect to occur, pthread_jit_write_np are just to allow mprotect flags to be used. Closes #9371.
|
#
14169615 |
| 16-Apr-2022 |
David CARLIER |
opcache JIT support improvements attempts on macOs. for cases when shared segments switch b/w R/W/X and R/X bits. Closes #8382.
|
#
d66d477d |
| 29-Jun-2022 |
Dmitry Stogov |
Fix incorrect condition introdused in 7cf6f173831caea9952a84b9e4a93594aac8ba00
|
#
7cf6f173 |
| 29-Jun-2022 |
Dmitry Stogov |
Fixed bug GH-8847 (PHP hanging infinitly at 100% cpu when check php syntaxe of a valid file)
|
#
3198b878 |
| 18-Feb-2022 |
Dmitry Stogov |
JIT: Fix register allocation Fixes oss-fuzz #44689
|
#
0d6b1735 |
| 11-Feb-2022 |
Dmitry Stogov |
JIT: Fix missed type store Fizes oss-fuzz #44376
|
#
f711c960 |
| 28-Jan-2022 |
Dmitry Stogov |
Fix incorrect register allocation Fixes oss-fuzz #44006
|
#
4543cd32 |
| 30-Dec-2021 |
Nikita Popov |
Remove JMPZNZ opcode While JMPZNZ can avoid execution of a separate JMP opcode in some cases, it also prevents smart branch optimization, so creating JMPZNZ may actually have a negat
Remove JMPZNZ opcode While JMPZNZ can avoid execution of a separate JMP opcode in some cases, it also prevents smart branch optimization, so creating JMPZNZ may actually have a negative effect. It also adds additional complexity for optimizations. Drop JMPZNZ in favor of JMPZ+JMP or JMPNZ+JMP. Closes GH-7857.
show more ...
|
#
49380b59 |
| 15-Dec-2021 |
Christoph M. Becker |
Fix #81679: Tracing JIT crashes on reattaching When a new process reattaches to OPcache, tracing JIT causes segfaults, because each new process allocates its own `zend_jit_traces` and
Fix #81679: Tracing JIT crashes on reattaching When a new process reattaches to OPcache, tracing JIT causes segfaults, because each new process allocates its own `zend_jit_traces` and `zend_jit_exit_groups` in SHM, although these need to be shared between all processes. We solve that by only allocating these structs for the first process, and store the pointers in `accel_shared_globals`, so we can reassign them when a new process reattaches. Closes GH-7776.
show more ...
|
#
e79dbe11 |
| 13-Dec-2021 |
Dmitry Stogov |
JIT: Fix crash during compilation of function with incompletely constructed SSA Fixes oss-fuzz #42200
|
#
c29f6baa |
| 06-Dec-2021 |
Dmitry Stogov |
JIT: Fix incorrect elimination of type store Fixes oss-fuzz #41995
|
#
d9554151 |
| 29-Nov-2021 |
Dmitry Stogov |
JIT: Fix named arguments handling Fixes oss-fuzz #41486
|
#
297117bb |
| 29-Nov-2021 |
Dmitry Stogov |
Disable type narrowing optimization when we contruct SSA for JIT This also revets incorrect fix introduced in f9518c3850982aca41fac22b87a1e11096eb1643
|
#
90b7bde6 |
| 03-Nov-2021 |
Dmitry Stogov |
Use more compact representation for packed arrays. - for packed arrays we store just an array of zvals without keys. - the elements of packed array are accessible throuf as ht->arPacked[
Use more compact representation for packed arrays. - for packed arrays we store just an array of zvals without keys. - the elements of packed array are accessible throuf as ht->arPacked[i] instead of ht->arData[i] - in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes (ZEND_HASH_MAP_FOREACH_*) - introduced an additional family of macros to access elements of array (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX, ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT - zend_hash_minmax() prototype was changed to compare only values Because of smaller data set, this patch may show performance improvement on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser) TODO: - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET). - zend_hash_sort_ex() may require converting packed arrays to hash.
show more ...
|
#
2c95c945 |
| 04-Oct-2021 |
Dmitry Stogov |
JIT: Eliminate useless EG(exception) checks after FETCH_DIM_*
|
#
7be7ec30 |
| 30-Sep-2021 |
Dmitry Stogov |
JIT: Allow register allocation for result of STRLEN and COUNT instructions
|