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
Nikita Popov
41f33b9dc3
Don't use CE info from pi node for MAY_BE_REF var
...
Once again, the actual class type may be reassigned indirectly.
2022-04-15 22:36:13 +02:00
Nikita Popov
3fdb1aa14e
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix inference for assignment of known object to reference
2022-04-15 22:15:32 +02:00
Nikita Popov
b08aac0451
Fix inference for assignment of known object to reference
...
We cannot retain the ce information in that case, we have to
assume the ce may change indirectly through the reference.
Fixes oss-fuzz #46720 .
2022-04-15 22:14:44 +02:00
Bob Weinand
e0025562d0
Merge branch 'PHP-8.0' into PHP-8.1
2022-04-04 14:25:23 +02:00
Bob Weinand
9cb512ecc1
Ensure correct target opline for exceptions thrown during yield from
...
Also appends the exception during a yield from values dtor instead of prepending it
Fixing regression introduced in 13649451c2
.
2022-04-04 14:24:39 +02:00
Dmitry Stogov
14fddd17df
Fix arsort() crash on recursion
...
Fixes oss-fuzz #46315
2022-04-04 12:03:39 +03:00
Bob Weinand
e4c7ffc152
Fix deprecated warning in new gh8289.phpt test
2022-04-01 17:51:18 +02:00
Bob Weinand
16dcededa8
Merge branch 'PHP-8.0' into PHP-8.1
2022-04-01 17:38:10 +02:00
Bob Weinand
13649451c2
Fix GH-8289: Exceptions thrown within a yielded from iterator are not rethrown into the generator
...
This also fixes the fact that exception traces were not including the generator frame when thrown in a yielded from iterator.
2022-04-01 17:32:48 +02:00
Ilija Tovilo
2145f80d4b
Register JSON_ERROR_NON_BACKED_ENUM constant ( #8285 )
...
Fixes GH-8238
2022-03-31 14:31:17 +02:00
Dmitry Stogov
33eec37830
Skip test for preloading
2022-03-14 13:03:21 +03:00
Dmitry Stogov
c6a53f9499
Fix non-reentirant startiong or error recording from error handler
...
Fixes oss-fuzz #45398
2022-03-11 10:50:31 +03:00
Bob Weinand
cbbf3502a2
Fix GH-8176: Fix leaking enum values in property initializers
2022-03-07 18:26:46 +01:00
Dmitry Stogov
ba6bb8579a
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix use after free
2022-03-01 01:34:17 +03:00
Dmitry Stogov
01702a851b
Fix use after free
...
Fixes oss-fuzz #44885
2022-03-01 01:33:22 +03:00
Christoph M. Becker
fb70460d8e
Fix GH-7958: Nested CallbackFilterIterator is leaking memory
...
We implement `zend_object_iterator_funcs.get_gc` for user iterators to
avoid the memory leak.
Closes GH-8107.
2022-02-21 12:39:07 +01:00
Ilija Tovilo
19063a84f0
Fix null static_variable_ptr for uncalled fake closures
...
Closes GH-8083
Closes GH-8109
2022-02-19 11:37:52 +01:00
Dmitry Stogov
22328f68aa
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-02-18 12:21:15 +03:00
Dmitry Stogov
84a638a346
Fix memory leak
...
Fixes oss-fuzz #44685
2022-02-18 12:20:40 +03:00
Dmitry Stogov
73fed0f028
Fix emory leak
...
Fixes oss-fuzz #44408
2022-02-11 15:16:08 +03:00
Dmitry Stogov
718478377b
Prevent array modification if it's captured by user error handler during
...
index conversion
Fixes oss-fuzz #44235
2022-02-01 17:22:18 +03:00
Dmitry Stogov
8e2406c59b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-02-01 16:25:03 +03:00
Dmitry Stogov
a60a9b4a89
Fix memory leak
...
Fixes oss-fuzz #44222
2022-02-01 16:24:22 +03:00
Dmitry Stogov
75b2973974
Fix array clobbering by user error handler
...
Fixes oss-fuzz #42363
2021-12-15 12:20:37 +03:00
Dmitry Stogov
76075823e7
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix array clobering by user error handler
2021-12-13 15:20:16 +03:00
Dmitry Stogov
cbc0b1afeb
Fix array clobering by user error handler
...
Fixes oss-fuzz #42234
2021-12-13 14:59:30 +03:00
Christoph M. Becker
206c521a1f
Fix GH-7757: Multi-inherited final constant causes fatal error
...
"Diamond" inheritance of final constants is supposed to be supported.
Closes GH-7767.
2021-12-12 22:22:51 +01:00
Dmitry Stogov
7e080183f4
Fix crush after compilation of nullsafe operator introduced in 307e476e86
...
Now we flush only delayed opcodes realted to this nullsafe operator.
Fixes oss-fuzz #42152
2021-12-09 18:15:47 +03:00
Nikita Popov
cf377eefa6
Don't convert assign op operand types in opcache
...
This is the same change as 56b18d478e
but for ASSIGN_OP. Changing the operand type may change the error
message and can result in different behavior with operator overloading.
As with the other patch, if there is strong interest this could be
added to the DFA pass instead, with an appropriate type check.
2021-12-06 21:56:04 +01:00
Dmitry Stogov
5459ed4c2f
Fix use after free because of data clobbering by user error handler
...
Fixes oss-fuzz #41692
2021-12-06 13:08:27 +03:00
Ilija Tovilo
b991ce9c1e
Improve final/abstract methods in interfaces error messages
...
Closes #81683
Closes GH-7722
2021-12-05 23:10:07 +01:00
Nikita Popov
26e424465c
Fix bug #81598 : Use C.UTF-8 as LC_CTYPE locale by default
...
Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.
Closes GH-7635.
2021-12-05 21:03:27 +01:00
Ilija Tovilo
dab6226cbe
Fix invalid opcode for ??= on $GLOBALS
...
Closes #81684
Closes GH-7717
2021-12-05 18:25:02 +01:00
Dmitry Stogov
307e476e86
Fixed bug #81216 (Nullsafe operator leaks dynamic property name)
...
Fixes oss-fuzz #38542
2021-12-04 18:04:24 +03:00
Dmitry Stogov
e52f57cf6b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Add test
ws
2021-12-03 13:40:27 +03:00
Dmitry Stogov
8d7d87cdc4
Add test
2021-12-03 13:40:17 +03:00
Dmitry Stogov
ddcfffad2c
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix yet another indirect string modification by error handler problem
2021-12-02 16:17:26 +03:00
Dmitry Stogov
94286cd596
Fix yet another indirect string modification by error handler problem
2021-12-02 16:16:54 +03:00