David Carlier
585ac794b4
Merge branch 'PHP-8.2'
2023-01-16 20:44:01 +00:00
David Carlier
385f410e4c
Merge branch 'PHP-8.1' into PHP-8.2
2023-01-16 20:43:08 +00:00
Niels Dossche
dfe9c2af19
Fix incorrect comparison in block optimization pass
...
We're in the case of ZEND_JMPZ_EX or ZEND_JMPNZ_EX. The opcode gets
overwritten and only after the overwriting gets checked if we're in a
JMPZ or JMPNZ case. This results in a wrong optimization.
Close GH-10329
2023-01-16 20:41:33 +00:00
Christoph M. Becker
2f4973fd88
Revert GH-10279
...
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816 >.
This reverts commit 45a128c9de .
This reverts commit 1eb71c3f15 .
This reverts commit 492523a779 .
This reverts commit c7a4633891 .
This reverts commit 308adb915c .
This reverts commit cd27d5e07f .
This reverts commit c5933409b4 .
This reverts commit 46371f4eb3 .
This reverts commit 623e2e9fc6 .
This reverts commit e7434c1247 .
This reverts commit d28d323ca2 .
This reverts commit 1a067b84ee .
This reverts commit a55c0c5fc3 .
This reverts commit b5aeb3a4d4 .
This reverts commit f061a035e4 .
This reverts commit b088575119 .
This reverts commit b1d48774a7 .
This reverts commit 94f9a20ce6 .
This reverts commit 4831e48708 .
This reverts commit cd985de190 .
This reverts commit 9521d21681 .
This reverts commit d6136151e9 .
2023-01-16 12:25:59 +01:00
Max Kellermann
492523a779
Zend/zend_inference: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
c7a4633891
Zend/Optimizer/zend_call_graph: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
308adb915c
Zend/Optimizer/sccp: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
cd27d5e07f
Zend/Optimizer/dce: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
c5933409b4
Zend/Optimizer/scdf: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
d28d323ca2
Zend/Optimizer/zend_ssa: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
1a067b84ee
Zend/Optimizer/zend_optimizer: include cleanup
2023-01-12 15:12:45 +00:00
Max Kellermann
a55c0c5fc3
Zend/Optimizer/zend_cfg: include cleanup
2023-01-12 15:12:45 +00:00
Dmitry Stogov
ce861373b9
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values)
2023-01-09 13:53:35 +03:00
Dmitry Stogov
9abc2108fa
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values)
2023-01-09 13:53:19 +03:00
Dmitry Stogov
4d4a53beee
Fix incorrect optimization of ASSIGN_OP may lead to incorrect result (sub assign -> pre dec conversion for null values)
2023-01-09 13:51:57 +03:00
Max Kellermann
5ea9a7e219
Zend/Optimizer/zend_ssa: make pointer const
2023-01-04 12:59:16 +00: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
Dmitry Stogov
f922597b51
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix memory leak because of incorrect optimization
2022-12-26 13:22:02 +03:00
Dmitry Stogov
0464524292
Fix memory leak because of incorrect optimization
...
Fixes oss-fuzz #54488
2022-12-26 13:20:55 +03:00
Ilija Tovilo
6d9d2eb355
Optimize JMP[N]Z_EX to BOOL instead of QM_ASSIGN ( #10108 )
...
&& and || should always evaluate to a boolean instead of the lhs/rhs.
This optimization never gets triggered for any of our tests.
Additionally, even if triggered this instruction gets optimized away
because the else branch of the JMP instruction will overwrite the tmp
value.
2022-12-17 12:47:02 +01:00
Dmitry Stogov
5e23cf9381
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix memory leak
2022-11-07 11:10:05 +03:00
Dmitry Stogov
de4b502fef
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix memory leak
2022-11-07 11:08:54 +03:00
Dmitry Stogov
f31f464cec
Fix memory leak
...
Fixes oss-fuzz #52999
2022-11-07 11:07:58 +03:00
Ilija Tovilo
c3b9b0f9a7
Fix stub type info for posix_getrlimit
2022-10-28 10:44:08 +02:00
Dmitry Stogov
5a68d991ad
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix memory leak
2022-10-17 15:09:33 +03:00
Dmitry Stogov
eecbb60db6
Fix memory leak
...
Fixes oss-fuzz #52479
2022-10-17 15:08:21 +03:00
Tim Starling
b8811d4ff1
Add four extra fields to gc_status() ( #9336 )
...
- running: true if garbage collection is currently running
- protected: true if the garbage collector is protected and root
additions are forbidden
- full: true if the garbage collector buffer size exceeds GC_MAX_BUF_SIZE
- buffer_size: current garbage collector buffer size
Documentation for existing fields:
- runs: the number of times the garbage collector has been run
- collected: the number of objects collected
- threshold: the number of roots in the buffer which will trigger
garbage collection
- roots: the current number of roots in the buffer
Updated manual example output:
array(8) {
["running"]=>
bool(false)
["protected"]=>
bool(false)
["full"]=>
bool(false)
["runs"]=>
int(5)
["collected"]=>
int(100002)
["threshold"]=>
int(50001)
["buffer_size"]=>
int(131072)
["roots"]=>
int(0)
}
2022-10-04 13:56:02 +01:00
Dmitry Stogov
94b8c2da9f
Fixed type inference
...
Fixes oss-fuzz #51640
2022-09-26 12:19:12 +03:00
Dmitry Stogov
7496a400aa
Fix SSA construction and type inference
...
Fixes oss-fuzz #51476
2022-09-19 15:45:34 +03:00
George Peter Banyard
6c4d24e4f0
Update cache slot size calculation in compact_literals.c
2022-09-10 13:20:59 +01:00
Dmitry Stogov
c151e9b75b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix type inference
2022-09-05 13:01:04 +03:00
Dmitry Stogov
c852e0fff9
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-09-05 12:56:34 +03:00
Máté Kocsis
5210872747
Regenerate optimizer func info after preprocessor condition changes
2022-09-02 17:18:42 +02:00
Dmitry Stogov
218da70bcf
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix memory leak
2022-08-29 14:54:49 +03:00
Dmitry Stogov
172ac0a48d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-08-29 14:54:40 +03:00
Dmitry Stogov
567213c32a
Drop range inference for IS_NULL/IS_FALSE/IS_TRUE.
...
These values not always converted to IS_LONG (e.g. by -- and ++) and
this leads to incorrect range inferene and later to incorrect JIT code
generation.
2022-08-23 11:22:31 +03:00
Dmitry Stogov
e10d2c2bf9
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-08-22 21:12:49 +03:00
Dmitry Stogov
95befc786a
Fix type inference
...
Fixes oss-fuzz #50272
2022-08-22 21:11:39 +03:00
Ilija Tovilo
a6f489b452
Fix mb_strimwidth RC info
...
Closes GH-9254
2022-08-05 17:06:23 +02:00
sji
3b62d66098
Implement constants in traits ( #8888 )
...
RFC: https://wiki.php.net/rfc/constants_in_traits
2022-08-04 20:08:40 +01:00
Bob Weinand
dc5475c191
Save previous observer on the VM stack
...
This avoids a possible significant performance penalty, when some leaf function was observed, deep in the stack.
As a side effect, we are not iterating over prev_execute_data anymore and thus, non-observed fake frames, possibly on stack, cannot have any impact on the observer anymore (especially within zend_observer_fcall_end_all).
Saving the previous observer happens now directly on the VM stack. If there is any observer, function frames are allocated an extra zval (the last temporary), which will, on observed frames, contain the previous observed frame address.
2022-08-04 17:16:27 +02:00
Dmitry Stogov
21507ef28a
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix SSA reconstruction when body of "foreach" loop is removed
2022-08-01 14:01:34 +03:00
Dmitry Stogov
4b19b85eb6
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix SSA reconstruction when body of "foreach" loop is removed
2022-08-01 14:01:11 +03:00
Dmitry Stogov
87cf05e8be
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-07-25 15:55:15 +03:00
Dmitry Stogov
d50875c822
Fix type inference
...
Fixes oss-fuzz #49423 and #49474
2022-07-25 15:53:06 +03:00
Ilija Tovilo
d4a9cc8856
Fix rc info of iterator_to_array ( #9080 )
...
This function can now return a copy of the provided array, resulting in
a value of RC != 1.
2022-07-21 15:05:34 +02:00
Go Kudo
4d8dd8d258
Implement Random Extension
...
https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement
2022-07-19 10:27:38 +01:00
Dmitry Stogov
71814e9d99
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-07-18 14:20:41 +03:00
Dmitry Stogov
82d3ad64df
Fix type inference
...
Fixes oss-fuzz #48908
2022-07-18 14:20:06 +03:00
Dmitry Stogov
26d890e6ba
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference for FETCH_DI_UNSET
2022-07-18 13:15:12 +03:00