Ilija Tovilo
9aaa5cd093
By-ref modification of typed and readonly props through ArrayIterator
...
Fixes GH-10844
Closes GH-10872
2023-03-25 16:14:19 +01:00
Ilija Tovilo
b5726c2cb1
Fix NUL byte in exception string terminating Exception::__toString()
...
Fixes GH-10810
Closes GH-10873
2023-03-19 10:48:26 +01:00
Kamil Tekiela
ad705afc2f
Merge branch 'Fix-strlen-error-message-param-name' into PHP-8.1
...
* Fix-strlen-error-message-param-name:
Fix strlen error message param name
2023-03-10 12:47:40 +00:00
Ilija Tovilo
7202fe16b7
Fix GH-10709: UAF in recursive AST evaluation
...
Fixes https://oss-fuzz.com/testcase-detail/6445949468934144
Closes GH-10718
2023-03-06 14:55:34 +01:00
Kamil Tekiela
1be99faeff
Fix strlen error message param name
2023-03-04 23:25:42 +00:00
Niels Dossche
b9a5bfc355
Fix GH-10570: Assertion `(key)->h != 0 && "Hash must be known"' failed.
...
Fixes GH-10570, see GH-10570 for analysis.
Closes GH-10572
2023-02-24 20:40:29 +01:00
Ilija Tovilo
7b68ff46da
Revert "Fix GH-10168: heap-buffer-overflow at zval_undefined_cv"
...
This reverts commit 71ddede565 .
2023-02-16 14:07:17 +01:00
Bob Weinand
95016138a5
Fix GH-10496: Fibers must not be garbage collected while implicitly suspended by resumption of another fiber
2023-02-13 16:30:21 +00:00
Arnaud Le Blanc
d721dcc2ef
Fix colletion of unfinished function call in fibers
...
Fixes GH-10496.
Co-authored-by: Bob Weinand <bobwei9@hotmail.com >
2023-02-13 13:09:04 +01:00
Ilija Tovilo
13c34aac05
Mark test as XFAIL
...
See https://github.com/php/php-src/pull/10546
2023-02-11 00:21:01 +01:00
Niels Dossche
71ddede565
Fix GH-10168: heap-buffer-overflow at zval_undefined_cv
...
The problem is that we're using the variable_ptr in the opcode handler
*after* it has already been destroyed. The solution is to create a
specialised version of zend_assign_to_variable which takes in two
destination zval pointers.
Closes GH-10524
2023-02-08 01:06:50 +01:00
Bob Weinand
00be6e1aed
Look at executing generator for fiber destructor behaviour
2023-01-30 12:32:53 +01:00
Bob Weinand
b9bca2dadb
Fix resetting ZEND_GENERATOR_IN_FIBER flag
...
Signed-off-by: Bob Weinand <bobwei9@hotmail.com >
2023-01-30 12:13:07 +01:00
Aaron Piotrowski
284c29328e
Fix GH-10437: Set active fiber to null on bailout ( #10443 )
2023-01-28 10:13:58 -06:00
Arnaud Le Blanc
1173c2e64a
Prevent dtor of generator in suspended fiber ( #10462 )
...
Generators that suspended a fiber should not be dtor because they will be
executed during the fiber dtor.
Fiber dtor throws an exception in the fiber's context in order to unwind and
execute finally blocks, which will also properly dtor the generator.
Fixes GH-9916
2023-01-27 19:32:25 +01:00
Arnaud Le Blanc
9830204213
Handle non-INDIRECT symbol table entries in zend_fiber_object_gc() ( #10386 )
...
Fixes GH-10340
2023-01-27 10:52:42 +01:00
Arnaud Le Blanc
4fb149390a
GC fiber unfinished executions ( #9810 )
2023-01-13 12:04:28 +01:00
Niels Dossche
833b45ac44
Fix GH-10249: Assertion `size >= page_size + 1 * page_size' failed.
...
Co-authored-by: Changochen <changochen1@gmail.com >
Closes GH-10284
2023-01-12 22:00:00 +00:00
Niels Dossche
d03025bf59
Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed.
...
zend_get_property_guard previously assumed that at least "str" has a
pre-computed hash. This is not always the case, for example when a
string is created by bitwise operations, its hash is not set. Instead of
forcing a computation of the hashes, drop the hash comparison.
Closes GH-10254
Co-authored-by: Changochen <changochen1@gmail.com >
Signed-off-by: George Peter Banyard <girgias@php.net >
2023-01-08 16:09:59 +00:00
George Peter Banyard
44add3c791
Add secondary test that registers a trampoline as a shutdown function
2022-12-23 16:34:57 +00:00
Derick Rethans
b489e0f2b8
Make sure to disable JIT when overriding execute_ex
2022-12-23 16:34:57 +00:00
Derick Rethans
233ffccc35
Fix GH-10072: PHP crashes when execute_ex is overridden and a __call trampoline is used from internal code
2022-12-23 16:34:57 +00:00
Dmitry Stogov
683285165e
Fix memory leak
...
Fixes oss-fuzz #54320
2022-12-19 12:11:16 +03: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
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
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
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
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
Dmitry Stogov
8258b7731b
Fix memory leak
...
Fixes oss-fuzz #51622
2022-09-26 11:43:38 +03:00
Dmitry Stogov
8a1f7fa721
Fix memory leak
...
Fixes oss-fuzz #51451
2022-09-19 13:03:24 +03:00
Ilija Tovilo
15ee9d2686
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix lsp error in eval'd code referring to incorrect class for static type
2022-09-08 10:53:45 +02:00
Ilija Tovilo
d5373eac46
Fix lsp error in eval'd code referring to incorrect class for static type
...
Fixes GH-9407
Closes GH-9471
2022-09-08 10:52:27 +02:00
Dmitry Stogov
5bab9e94fd
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leaks
2022-08-22 17:47:43 +03:00
Dmitry Stogov
73c2d79fc5
Fix memory leaks
...
Fixes oss-fuzz #50078
2022-08-22 17:47:07 +03:00
Michael Olšavský
0709578517
Fix GH-9266: GC root buffer keeps growing when dtors are present
...
Do not reset cleared count on GC rerun.
Closes GH-9265.
2022-08-09 14:16:11 +02:00
Arnaud Le Blanc
aadb24e817
Merge branch 'PHP-8.0' into PHP-8.1
2022-07-15 13:15:05 +02:00
Tobias Bachert
ede92a86f2
Fix WeakMap object reference offset causing TypeError ( #8995 )
2022-07-15 13:00:48 +02:00
Ilija Tovilo
110573726b
Disallow assigning reference to unset readonly property
...
Closes GH-7942
Closes GH-8188
2022-07-01 12:16:32 +02:00
Nicolas Grekas
96e3a9d316
Fix RC=1 references of declared properties when casting objects to arrays
...
Fixes GH-8655.
Closes GH-8737.
2022-06-09 13:28:12 +02:00
Ilija Tovilo
93fc88e808
Fix Enum::from/tryFrom memory leak in JIT for internal enums
...
when passing an int to a string enum. Previously, the int was coerced to
a string. The JIT skips parameter clean up when unnecessary. In this
particular case, passing int to from(int|string) normally doesn't cause
a coercion so no dtor for the $value zval is generated.
To circumvent this we avoid coersion by explicitly allowing ints and
converting them to strings ourselves. Then we can free it appropriately.
See GH-8518
Closes GH-8633
2022-05-28 10:51:17 +02:00
Dmitry Stogov
b1b79c74fb
Fix memory leak
...
This fixes oss-fuzz #47088
2022-05-11 11:43:01 +03:00
Ilija Tovilo
82d3a831d2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method
2022-04-23 11:19:20 +02:00
Ollie Read
d0f1b987a5
Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method
...
Closes GH-8424
2022-04-23 11:16:28 +02:00
Nikita Popov
11f950e77e
Don't optimize trailing args for prototype fbc
2022-04-18 17:57:16 +02:00
Nikita Popov
38547b996a
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Don't use CE for by-ref arguments
2022-04-15 23:00:59 +02:00
Nikita Popov
5d072578cd
Don't use CE for by-ref arguments
2022-04-15 23:00:43 +02:00
Nikita Popov
f1814e6a1f
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Don't use CE info from pi node for MAY_BE_REF var
2022-04-15 22:37:29 +02:00