Pierrick Charron
232bc2d220
Update versions for PHP 8.2.1RC1
2022-12-13 19:14:42 -05:00
Christoph M. Becker
b683a7e470
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fallback to first line of function when ex->opline is NULL (#10003 )
2022-12-05 12:45:22 +01:00
Arnaud Le Blanc
adc23828b4
Fallback to first line of function when ex->opline is NULL ( #10003 )
...
ex->opline can be null due to missing SAVE_OPLINE() in the VM
Fixes GH-9933
2022-12-02 17:21:30 +01:00
Christoph M. Becker
6b1f4c5a44
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix GH-9769: Misleading error message for unpacking of objects
2022-12-02 13:11:51 +01:00
蝦米
93592ea743
Fix GH-9769: Misleading error message for unpacking of objects
...
Only arrays can be unpacked in constant expressions.
Closes GH-9776.
2022-12-02 13:10:59 +01:00
George Peter Banyard
86456574bb
Fix performance degradation introduced in c2547ab7dc
...
After discussing with someone, our current running theory is that the local
variable forces the compiler to reserve an additional register for the whole
lifespan of the function. Dropping it and just loading the value should restore
the previous code generation.
Closes GH-9876
2022-11-22 12:35:25 +00:00
Dmitry Stogov
45cb3f917a
Fix a memory leak in tracig JIT when the same closure is called through Closure::call() and natively.
...
Closure::call() makes a temporary copy of original closure function, modifies its
scope, resets ZEND_ACC_CLOSURE flag and call it through zend_call_function().
As result the same function may be called with and without
ZEND_ACC_CLOSURE flag, that confuses JIT and may lead to memory leak or
even worse memory errors.
The patch allocates "fake" closure object and keep ZEND_ACC_CLOSURE flag
to always behave in the same way.
2022-11-21 17:41:16 +03:00
Christoph M. Becker
c6204ac930
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix GH-9650: Can't initialize heap: [0x000001e7]
2022-11-17 14:18:51 +01:00
Michael Voříšek
8d65c2fee5
Fix GH-9650: Can't initialize heap: [0x000001e7]
...
Closes GH-9721.
2022-11-17 14:16:10 +01:00
Bob Weinand
182314c317
Do not report MINIT stage internal class aliases in extensions
...
Signed-off-by: Bob Weinand <bobwei9@hotmail.com >
2022-11-09 16:36:05 +01:00
Bob Weinand
6bd8f40291
Move observer_declared_function_notify until after pass_two()
...
For early observing, there already exists a op_array_ctor hook on zend_extension.
However the goal of the declared_function observer is noting the time when a fully defined function starts existing in the function_tables.
This also prevents the observer being called in case there were compilation errors.
Ultimately, this now gives a consistent behaviour with respect to how it works when opcache is enabled:
- pass_two is done, opcodes and flags are all finalized.
- similarly class_linked notifications also only happen once the class is actually finalized.
- any extension wanting to delay the observer call may add the ZEND_COMPILE_IGNORE_OBSERVER compiler_option, then call it itself.
2022-11-09 13:15:41 +01:00
Pierrick Charron
44d652c00a
PHP-8.2 is now for PHP 8.2.1-dev and prepare NEWS for 8.2.0
2022-11-08 13:26:35 -05:00
Patrick Allaert
540488c74e
PHP-8.1 is now for PHP 8.1.14-dev
2022-11-08 17:57:34 +01:00
Dmitry Stogov
05b63b1593
Don't check "fake" closures (fix assertion)
...
Fixes oss-fuzz #53078
2022-11-07 12:19:54 +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
Arnaud Le Blanc
34a85fbea0
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[ci skip] NEWS
[ci skip] NEWS
Fix generator memory leaks when interrupted during argument evaluation (#9756 )
2022-11-04 16:02:04 +01:00
Arnaud Le Blanc
4011657719
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
[ci skip] NEWS
Fix generator memory leaks when interrupted during argument evaluation (#9756 )
2022-11-04 15:59:14 +01:00
Arnaud Le Blanc
5d1f3e047c
Fix generator memory leaks when interrupted during argument evaluation ( #9756 )
2022-11-04 15:55:55 +01:00
Ilija Tovilo
cc9dddea38
Fix fake closure leaking when called from internal func
...
Introduced in 8e49d7f32f .
ZEND_CALL_RELEASE_THIS was previously not handled for internal calls but
just for user calls in the zend_leave_helper.
Closes GH-9884
2022-11-03 14:31:47 +01:00
Martin Schröder
fdd088fc81
Properly deal with internal attributes used on promoted properties.
...
Closes GH-9661
2022-11-03 14:29:22 +01:00
Bob Weinand
8e49d7f32f
Delay releasing closures until after observer end
2022-11-02 16:55:13 +01:00
Bob Weinand
b30448f48f
Fix observing inherited internal functions
...
Fixes GH-9871
2022-11-02 15:33:04 +01:00
Florian Sowade
8dabbda8bc
Don’t reset func in zend_closure_internal_handler
...
The pointer is used in _zend_observe_fcall_begin().
2022-11-02 11:46:43 +01:00
Dmitry Stogov
482ae71fda
Fix memory leak
2022-10-31 12:20:28 +03:00
Ilija Tovilo
1d6b32f65c
Remove unnecessary ast eval bailout
...
We can just reset the filename_override to NULL in php_request_shutdown.
Closes GH-9805
2022-10-27 10:54:59 +02:00
Florian Sowade
b9474bf385
Don’t report arginfo violations on fake closures ( #9823 )
2022-10-26 12:21:41 +02:00
George Peter Banyard
cb3adf351d
Fix OpCache build after 0b0259a418
...
The intersection type needs to be marked as being allocated on the arena otherwise zend_persist_type() tries to free it and corrupts the Zend MM Heap
Also we only need to allocate the space for a list of size 1 and not the whole length of the intersection type
2022-10-24 15:17:26 +01:00
George Peter Banyard
8c2df899d0
Revert 01eb06a0de
...
We do not need this shim anymore since it is converted to a proper DNF type at compile time
2022-10-24 11:41:42 +01:00
George Peter Banyard
0b0259a418
Convert Implicitly nullable pure intersection types to DNF
...
If we don't then Reflection would give us a ReflectionIntersectionType even if the type is currently displayed as (X&Y)|null
2022-10-24 11:39:54 +01:00
David Carlier
dbedb69f6a
Merge branch 'PHP-8.1' into PHP-8.2
2022-10-23 00:46:46 +01:00
David Carlier
fe06c5ef60
Merge branch 'PHP-8.0' into PHP-8.1
2022-10-23 00:46:25 +01:00
Adam Saponara
45e224cf51
Fix GH-9709: Guard against current_execute_data==NULL in is_handle_exception_set
2022-10-23 00:46:05 +01:00
Arnaud Le Blanc
cfd5fb98e4
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[ci skip] NEWS
[ci skip] NEWS
Fix compilation warning
Fix crash when memory limit is exceeded during generator initialization
2022-10-22 10:44:55 +02:00
Arnaud Le Blanc
ebe58459aa
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
[ci skip] NEWS
Fix compilation warning
Fix crash when memory limit is exceeded during generator initialization
2022-10-22 10:44:06 +02:00
Arnaud Le Blanc
26c7c82d32
Fix crash when memory limit is exceeded during generator initialization
2022-10-22 10:40:28 +02:00
Dmitry Stogov
eecbb60db6
Fix memory leak
...
Fixes oss-fuzz #52479
2022-10-17 15:08:21 +03:00
Arnaud Le Blanc
a1295cbfce
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[ci skip] NEWS
[ci skip] NEWS
Restore extra_named_params when restoring frozen call stack
2022-10-16 12:45:41 +02:00
Arnaud Le Blanc
2831e0c624
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
[ci skip] NEWS
Restore extra_named_params when restoring frozen call stack
2022-10-16 12:43:34 +02:00
Arnaud Le Blanc
86e1fea39a
Restore extra_named_params when restoring frozen call stack
2022-10-16 12:40:09 +02:00
Ben Ramsey
865161af33
PHP-8.1 is now for PHP 8.1.13-dev
2022-10-11 19:47:00 -04:00
George Peter Banyard
01eb06a0de
Follow-up fix for GH-9655
...
Type needs to be rendered as a DNF type and not X&Y|null
2022-10-04 14:24:51 +01:00
HypeMC
279ffdb598
Fix GH-9655: Allow pure intersection types to be implicitly nullable
...
Closes GH-9659
2022-10-03 11:02:52 +01:00
George Peter Banyard
c801076d8b
Fix GH-9556 "iterable" alias "array|Traversable" breaks PHP 8.1 code
...
Closes GH-9558
2022-09-30 12:49:15 +01:00
George Peter Banyard
74ae498a4b
Move object/class redundancy check into union type handling
...
As such a redundancy can only happen for union types
2022-09-30 12:48:56 +01:00
George Peter Banyard
0d19ae4068
Add support for binary and octal number prefixes for INI settings
...
Closes GH-9560
2022-09-30 11:56:39 +01:00
Dmitry Stogov
94b8c2da9f
Fixed type inference
...
Fixes oss-fuzz #51640
2022-09-26 12:19:12 +03:00
Dmitry Stogov
c083efb779
Fix memory leak
...
Fixes oss-fuzz #51622
2022-09-26 12:02:03 +03:00
Dmitry Stogov
5ad8b3bcfa
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix memory leak
2022-09-26 11:47:32 +03:00
Dmitry Stogov
b20568d4fa
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-09-26 11:44:38 +03:00