1
0
mirror of https://github.com/php/php-src.git synced 2026-04-06 15:43:13 +02:00
Commit Graph

1866 Commits

Author SHA1 Message Date
Dmitry Stogov
94eb3bdcbf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed tracing JIT support for CALLABLE_CONVERT (#12156)
2023-09-08 18:27:44 +03:00
Dmitry Stogov
8fcffa666f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed tracing JIT support for CALLABLE_CONVERT (#12156)
2023-09-08 18:27:31 +03:00
Dmitry Stogov
be0245c756 Fixed tracing JIT support for CALLABLE_CONVERT (#12156) 2023-09-08 18:27:13 +03:00
Dmitry Stogov
3ffa1c4c3e Fix ws 2023-09-06 00:01:03 +03:00
Dmitry Stogov
95edb50b58 Fixed tracing jit for BIND_INIT_STATIC_OR_JMP 2023-09-05 23:57:38 +03:00
Ilija Tovilo
b80bebc278 Synchronize zend_jit_stop_counter_handlers()
Avoid stopping counters repeatedly from different threads/processes.

Fixes GH-11609
Closes GH-11806
2023-08-03 10:19:11 +02:00
Ilija Tovilo
1a0ef2c1cc Revert "Remove name field from the zend_constant struct (#10954)"
This reverts commit f42992f580.

Closes GH-11604
2023-07-17 22:32:41 +02:00
Ilija Tovilo
ad1b70d67e Revert "Revert "Remove name field from the zend_constant struct (#10954)""
This reverts commit 9f4bd3040d.
2023-07-04 16:42:40 +02:00
Máté Kocsis
9f4bd3040d Revert "Remove name field from the zend_constant struct (#10954)"
This reverts commit f42992f580.

Fix GH-11423
2023-07-03 15:16:24 +02:00
Dmitry Stogov
1949151935 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fixed incorrect VM stack overflow checks elimination
2023-06-20 12:00:32 +03:00
Dmitry Stogov
e50ed0f1a2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed incorrect VM stack overflow checks elimination
2023-06-20 12:00:20 +03:00
Dmitry Stogov
1a96d64828 Fixed incorrect VM stack overflow checks elimination 2023-06-20 11:59:36 +03:00
George Peter Banyard
d5ad75108e More usage of known zend_str instead of C string (#11381) 2023-06-08 13:03:29 +01:00
Dmitry Stogov
376b1efa7f Merge branch 'PHP-8.2'
* PHP-8.2:
  Fixed deoptimization info for interrupt handler
2023-06-06 13:30:35 +03:00
Dmitry Stogov
724e64fbda Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed deoptimization info for interrupt handler
2023-06-06 13:30:21 +03:00
Dmitry Stogov
8f06febedf Fixed deoptimization info for interrupt handler 2023-06-06 13:29:55 +03:00
George Peter Banyard
99fa740acb Use common function for TypeError on illegal offset access (#10544)
This merges all usages of emitting an offset TypeError into a new ZEND_API function
zend_illegal_container_offset(const zend_string* container, const zval *offset, int type);

Where the container should represent the type on which the access is attempted (e.g. string, array)
The offset zval that is used, where the error message will display its type
The type of access, which should be a BP_VAR_* constant, to get special message for isset/empty/unset
2023-06-06 11:28:19 +01:00
Ilija Tovilo
2d86e95238 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix zend_jit_stop_counter_handlers() performance issues with protect_memory=1
2023-05-26 10:55:46 +02:00
Ilija Tovilo
5b033b0def Fix zend_jit_stop_counter_handlers() performance issues with protect_memory=1
The function repeatedly calls mprotect() which is extremely slow. In our
community build, the Laravel tests went from ~6 minutes to ~4 hours. This issue
only occurs with opcache.protect_memory=1.

Closes GH-11323
2023-05-26 10:55:11 +02:00
Ilija Tovilo
0b1d750d91 Allow arbitrary expressions in static variable initializer
Closes GH-9301
2023-05-24 20:17:31 +02:00
Sara
6bd546462c Cacheline demote to improve performance (#11101)
Once code is emitted to JIT buffer, hint the hardware to
demote the corresponding cache lines to more distant level
so other CPUs can access them more quickly.
This gets nearly 1% performance gain on our workload.

Signed-off-by: Xue,Wang   <xue1.wang@intel.com>
Signed-off-by: Tao,Su     <tao.su@intel.com>
Signed-off-by: Hu,chen    <hu1.chen@intel.com>
2023-05-15 10:28:43 +03:00
Dmitry Stogov
56d1cc7842 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fixed GH-11127 (JIT fault)
2023-05-02 20:33:34 +03:00
Dmitry Stogov
c155949905 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed GH-11127 (JIT fault)
2023-05-02 20:33:19 +03:00
Dmitry Stogov
ed0b593c11 Fixed GH-11127 (JIT fault)
* Fixed GH-11127 (JIT fault)

* Added test

* Add new line
2023-05-02 20:32:48 +03:00
Sara
0e5ac62f4e Add configuration opcache.jit_max_trace_length (#11173)
Max length of a single trace. A long trace generates long JITTed
code, which influences the performance slightly.
opcache.jit_max_trace_length range is [4,1024], the default value
is 1024.


Reviewed-by:   Su, Tao   <tao.su@intel.com>

Signed-off-by: Wang, Xue <xue1.wang@intel.com>
2023-05-02 18:47:13 +03:00
yang yuhan
f127e6581a JIT: Align JIT stubs (#11149)
Fixed phpGH-11120

Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
2023-05-02 12:34:49 +03:00
Dmitry Stogov
f0122664fe Merge branch 'PHP-8.2'
* PHP-8.2:
  JIT: Fixed inaccurate range inference usage for UNDEF/NULL/FALSE
2023-05-02 12:04:11 +03:00
Dmitry Stogov
7e50735140 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  JIT: Fixed inaccurate range inference usage for UNDEF/NULL/FALSE
2023-05-02 12:04:03 +03:00
Dmitry Stogov
25ad171f63 JIT: Fixed inaccurate range inference usage for UNDEF/NULL/FALSE
Fixes oss-fuzz #58459
2023-05-02 12:02:20 +03:00
Dmitry Stogov
0660fb5282 Merge branch 'PHP-8.2'
* PHP-8.2:
  Allow FETCH_OBJ_W and FETCH_STATIC_PROP_W to return INDIRECT/UNDEF zval for uninitialized typed properties (#11048)
2023-04-10 23:25:42 +03:00
Dmitry Stogov
e14ac1caee Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Allow FETCH_OBJ_W and FETCH_STATIC_PROP_W to return INDIRECT/UNDEF zval for uninitialized typed properties (#11048)
2023-04-10 23:25:08 +03:00
Dmitry Stogov
0c65b396d6 Allow FETCH_OBJ_W and FETCH_STATIC_PROP_W to return INDIRECT/UNDEF zval for uninitialized typed properties (#11048) 2023-04-10 23:19:17 +03:00
Dmitry Stogov
e1c6fb76c0 JIT support for delayed destructor for zend_assign_to_typed_ref/prop 2023-04-04 18:55:47 +02:00
Dmitry Stogov
24acb4f134 Delay destructor for zend_std_write_property 2023-04-04 18:55:47 +02:00
Máté Kocsis
f42992f580 Remove name field from the zend_constant struct (#10954)
As global constant names are case-sensitive now, we don't have to store them separately above the constant table.
2023-04-03 22:13:47 +02:00
Dmitry Stogov
9a8123142e Merge branch 'PHP-8.2'
* PHP-8.2:
  Tracing JIT: Fixed incorrect code generation fofr SEND-ing of result of ASSIGN to typed reference
2023-04-03 18:15:59 +03:00
Dmitry Stogov
962aac698e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Tracing JIT: Fixed incorrect code generation fofr SEND-ing of result of ASSIGN to typed reference
2023-04-03 18:15:46 +03:00
Dmitry Stogov
8a749c79d0 Tracing JIT: Fixed incorrect code generation fofr SEND-ing of result of ASSIGN to typed reference 2023-04-03 18:15:41 +03:00
George Peter Banyard
d7c351ea54 Propagate UTF-8 flag during Rope operations (#10915) 2023-03-26 14:18:46 +01:00
Michael Orlitzky
87922411bf Use capstone explicitly, drop oprofile (GH 10876) (#10918)
* ext/opcache/config.m4: new --with-opcache-capstone flag.

Until now, libcapstone has been detected "automagically" and used for
JIT disassembly whenever it is available on the system used to compile
PHP. This can have some unintended consequences, however: many users
have capstone installed for some other purpose, and are surprised to
find that PHP breaks when capstone is later uninstalled.

To address this, we have introduced a new --with-opcache-capstone flag
that is disabled by default, and that makes the user's preference
explicit. It is ignored unless the JIT is enabled.

* ext/opcache: drop support for the oprofile JIT profiler.

Recently we have replaced the "automagic" detection of capstone at
build time with a --with-opcache-capstone flag. The detection of
oprofile causes similar problems and would likely have the same
solution; however, it was suggested that we might remove oprofile
altogether. So, this commit removes it:

  * Remove the detection bits from ext/opcache/config.m4.
  * Drop HAVE_OPROFILE ifdef blocks.
  * Delete ext/opcache/jit/zend_jit_oprofile.c.
  * Undefine the ZEND_JIT_DEBUG_OPROFILE constant.
2023-03-25 15:12:34 +01:00
Niels Dossche
f9375dc723 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix module shutdown crash during ZTS JIT shutdown
2023-03-13 20:12:37 +01:00
Niels Dossche
ae39069051 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix module shutdown crash during ZTS JIT shutdown
2023-03-13 20:12:30 +01:00
Niels Dossche
b3e28e2290 Fix module shutdown crash during ZTS JIT shutdown
Commit a21195650e 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.
2023-03-13 20:12:13 +01:00
Bob Weinand
a00e4a3649 Merge branch 'PHP-8.2' 2023-03-13 12:39:40 +01:00
Bob Weinand
ce2000d9be Merge branch 'PHP-8.1' of github.com:php/php-src into PHP-8.2 2023-03-13 12:39:15 +01:00
Bob Weinand
1015f1ff61 Add test, fix x86 JIT
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2023-03-13 12:36:59 +01:00
Bob Weinand
c53e8d3e30 Handle zend_execute_internal in JIT 2023-03-13 12:36:59 +01:00
Ilija Tovilo
0760a57205 [skip ci] Remove references to Azure Pipelines 2023-03-10 01:32:28 +01:00
Ilija Tovilo
3f7dadfeca Fix readonly+clone JIT issues
Closes GH-10748
2023-03-07 13:20:52 +01:00
Ilija Tovilo
1978a7b393 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10709: UAF in recursive AST evaluation
2023-03-06 14:58:25 +01:00