Commit Graph

126901 Commits

Author SHA1 Message Date
Bob Weinand
85b669e565 Merge branch 'PHP-8.0' into PHP-8.1 2022-03-01 14:54:09 +01:00
Bob Weinand
e6cf583160 Fix GH-8082: Prevent leaking memory on observed transient run_time_caches
This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer).
That way round, if the run_time_cache is freed all associated observer data is as well.

This approach has been chosen, as to avoid any ABI or API breakage.
Future versions may for example choose to provide a hookable API for run_time_cache freeing or similar.
2022-03-01 14:49:44 +01:00
Gabriel Caruso
05f2fb3af3
Fix NEWS format 2022-03-01 11:32:28 +01:00
Gabriel Caruso
5507201a38
Prepare for PHP 8.0.18 2022-03-01 11:30:01 +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
Dmitry Stogov
bb0b4eb996 Fix infiniry recursion during serialize() of "tricky" object
Fixes oss-fuzz #44954
2022-03-01 00:00:22 +03:00
Dmitry Stogov
aced867a95 Fix typr inference
Fixes oss-fuzz #45020
2022-02-28 18:25:49 +03:00
Dmitry Stogov
f67986a921 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix memory leak
2022-02-28 15:52:25 +03:00
Dmitry Stogov
70f7e7d83f JIT: Fix memory leak
Fixes oss-fuzz #44920
2022-02-28 15:43:03 +03:00
Dmitry Stogov
0a5162b2b6 Allow setting full type info 2022-02-28 13:55:25 +03:00
Dmitry Stogov
2ae1e7a2a3 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix register allocator
2022-02-28 13:52:16 +03:00
Dmitry Stogov
ac8a53cab1 JIT: Fix register allocator
Fixes oss-fuzz #44916
2022-02-28 13:48:53 +03:00
Christoph M. Becker
27d2fddf6a
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8080: ReflectionClass::getConstants() depends on def. order
2022-02-28 10:11:29 +01:00
Christoph M. Becker
0d266a24d6
Fix GH-8080: ReflectionClass::getConstants() depends on def. order
When we need to evaluate constant ASTs, we always have to do that in
the scope where the constant has been defined, which may be a parent
of the `ReflectionClass`'s scope.

Closes GH-8106.
2022-02-28 10:08:47 +01:00
Dmitry Stogov
56d7672d56 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed incorrect DCE for FREE
2022-02-28 11:54:25 +03:00
Dmitry Stogov
78c7289f69 Fixed incorrect DCE for FREE
Fixes oss-fuzz #44863
2022-02-28 11:44:22 +03:00
Dmitry Stogov
8b8cf8f8f5 JIT: Fix register clobbering 2022-02-28 10:58:14 +03:00
Christoph M. Becker
33cd61c904
Fix GH-8140: Wrong first class callable by name optimization
When optimizing by name function calls, we must not replace
`CALLABLE_CONVERT` opcodes, but have to keep them.

Closes GH-8144.
2022-02-24 10:35:53 +01:00
Tyson Andre
5d907dfcee Merge branch 'PHP-8.0' into PHP-8.1 2022-02-23 19:26:24 -05:00
Tyson Andre
cd1c6f0b81
Fixes infinite recursion introduced by patch to SplFixedArray (#8105)
Closes GH-8079

Track whether the spl_fixedarray was modified since the last call to
get_properties
2022-02-23 19:23:00 -05:00
Ilija Tovilo
e80ec3fe16
Mark failing JIT test with XFAIL 2022-02-23 22:46:10 +01:00
Ilija Tovilo
1e8d35adab
GitHub actions test with firebird, dblib and werror 2022-02-23 22:22:00 +01:00
Alex Dowad
bbc111ed3f Add NEWS entry for recent MBString bugfix (re: '7bit' encoding)
Thanks to Kamil Tekiela for mentioning that this should be done.
2022-02-23 22:56:55 +02:00
Ilija Tovilo
100ce1f1f7
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Migrate CI to GitHub actions
2022-02-23 15:20:11 +01:00
Ilija Tovilo
41461cf812
Migrate CI to GitHub actions 2022-02-23 14:32:50 +01:00
Alex Dowad
8a8533d263 mb_check_encoding($str, '7bit') rejects strings with bytes over 0x7F
This was the old behavior of mb_check_encoding() before 3e7acf901d,
but yours truly broke it. If only we had more thorough tests at that
time, this might not have slipped through the cracks.

Thanks to divinity76 for the report.
2022-02-22 23:56:56 +02:00
Christoph M. Becker
7ea3b19331
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8074: Wrong type inference of range() result
2022-02-22 10:20:13 +01:00
Christoph M. Becker
ef80dcb80b
Fix GH-8074: Wrong type inference of range() result
If either the first or second operand of `range()` may be a string, we
must not exclude the possibility that the result may be an array of
longs.

Closes GH-8131.
2022-02-22 10:14:54 +01: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
afbb9b9a1b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix register allocation
2022-02-18 17:15:51 +03:00
Dmitry Stogov
3198b8787b JIT: Fix register allocation
Fixes oss-fuzz #44689
2022-02-18 17:15:07 +03: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
7e8257fbd2 Disable ASSIGN optimization for values inferred for fatal errors. 2022-02-18 11:35:43 +03:00
Dmitry Stogov
90ca8f97de Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Release lock and protect SHM before replaying warnings
2022-02-17 19:25:42 +03:00
Dmitry Stogov
8f5480e7eb Release lock and protect SHM before replaying warnings 2022-02-17 19:16:15 +03:00
Nikita Popov
40e0bdb19d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Initialize int_codepoint in parse_code_point_param()
2022-02-16 19:03:33 +01:00
Nikita Popov
bfe9531dc1 Initialize int_codepoint in parse_code_point_param()
This is being passed to convert_cp(), and passing an uninitialized
value to a function is undefined behavior. Clang 14 makes use of
noundef facts aggressively and miscompiles this code if not
initialized.
2022-02-16 19:01:44 +01:00
Christoph M. Becker
720d6faa29
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bugtracker URL
2022-02-15 19:15:24 +01:00
Christoph M. Becker
e98a7a68b7
Fix bugtracker URL
The php-src bugtracker is now on Github.

Closes GH-8102.
2022-02-15 19:14:07 +01:00
Derick Rethans
0e32d3f510 Merge branch 'PHP-8.0' into PHP-8.1 2022-02-15 13:28:00 +00:00
Derick Rethans
6fbf5a61bb Merge branch 'PHP-7.4' into PHP-8.0 2022-02-15 13:27:48 +00:00
Derick Rethans
325bcf9f1d Prepare for 7.4.29 2022-02-15 13:27:37 +00:00
Tyson Andre
0fab520ded
Fix zend_register_internal_class_ex alias generation (#8091)
This wouldn't work for creating aliases in a namespace.

It would create the class alias "MyNS_ClassName" instead of
"MyNS\\ClassName"
2022-02-14 17:58:26 -05:00
Derick Rethans
7add0da996 Merge branch 'PHP-8.0' into PHP-8.1 2022-02-14 16:25:19 +00:00
Derick Rethans
f81059484d Merge branch 'PHP-7.4' into PHP-8.0 2022-02-14 16:24:44 +00:00
Derick Rethans
d13ceb74fa Add fix to NEWS 2022-02-14 16:23:06 +00:00
Kamil Tekiela
2bae4e8dbb
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug GH-8058 - mysqlnd segfault when prepare fails
2022-02-14 12:02:57 +00:00