Commit graph

68837 commits

Author SHA1 Message Date
Derick Rethans
22b2a579ba
Updated to version 2025.2 (2025b) 2025-03-24 10:06:34 +00:00
Ilija Tovilo
d5bdf8f508
Fix segfault when evaluating const expr default value of child prop with added hooks
Introduced by GH-17870. Not adding a NEWS entry since this is fixed in
the same version.

Fixes oss-fuzz #403816122
Closes GH-18098
2025-03-23 16:35:04 +01:00
Niels Dossche
7d1a2d03e4
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [ci skip] Make sure opcache can output in these tests
2025-03-21 16:35:57 +01:00
Niels Dossche
071f707a6d
[ci skip] Make sure opcache can output in these tests 2025-03-21 16:35:47 +01:00
Niels Dossche
fe7f9571d2
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix intl tests for icu 77 (#18125)
2025-03-21 14:25:18 +01:00
Niels Dossche
8823f89a32
Fix intl tests for icu 77 (#18125) 2025-03-21 14:23:03 +01:00
Niels Dossche
d765b60778
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18107: Opcache CFG jmp optimization with try-finally breaks the exception table
2025-03-21 13:57:16 +01:00
Niels Dossche
2ec8d37eb4
Fix GH-18107: Opcache CFG jmp optimization with try-finally breaks the exception table
If there's a try-finally where the try_op starts on a basic block with a
single JMP, and the JMP optimization causes that basic block to become
unreachable, then we update try_op.
In this case, there is no catch_op, so try_op is erroneously set to 0,
we should instead set it to `b->start`.

Closes GH-18110.
2025-03-21 13:56:31 +01:00
Remi Collet
1c230c27ec
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS for #66049
  Fix #66049 Typemap can break parsing in parse_packet_soap leading to a segfault
2025-03-21 08:25:23 +01:00
Remi Collet
209f4c296e
Fix #66049 Typemap can break parsing in parse_packet_soap leading to a segfault 2025-03-21 08:23:12 +01:00
Niels Dossche
0ef57501d9
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak when destroying PDORow
2025-03-20 23:14:14 +01:00
Niels Dossche
2dde07af55
Fix memory leak when destroying PDORow
This should call zend_object_std_dtor() to clean the property table etc.
This also has a semantic influence because previously weak refs were not
notified for example.

This fixes the final issue in GH-18114 (the crash was master-only and
fixed already).

Closes GH-18114.
Closes GH-18123.
2025-03-20 23:13:42 +01:00
Niels Dossche
66498152f1
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18112: NULL access with preloading and INI option
2025-03-20 19:12:47 +01:00
Niels Dossche
e9c0296240
Fix GH-18112: NULL access with preloading and INI option
Preloading shutdown calls request shutdown which will deactivate the
virtual cwd state. However, further startup code still assumes the state
that was set by virtual_cwd_startup(). So we need to reactivate it
manually.

Creating a test was a bit difficult because the INI setting I wanted to
test this with is overridden by the test runner apparently.
To reproduce the issue, create an empty file test.php and execute this
in a ZTS build:
`php -d opcache.preload=./ext/opcache/tests/preload_class_alias_2.inc -d "error_log=" -d "allow_url_include=1" test.php`

Closes GH-18117.
2025-03-20 19:12:06 +01:00
Niels Dossche
9488684703
Add test for GH-18113
Fixed in https://github.com/dstogov/ir/pull/110 and merged via b932c267.

Closes GH-18113.
2025-03-19 23:49:43 +01:00
Dmitry Stogov
b932c267f8
Update IR
IR commit: 3d0124a06ee4321e1305f893b74840033d939e88
2025-03-20 01:10:56 +03:00
Niels Dossche
2c45d67ad3
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix xinclude destruction of live attributes
2025-03-18 22:04:13 +01:00
Niels Dossche
d9329b1522
Fix xinclude destruction of live attributes
Follow-up for GH-17847 but now for attributes.

Closes GH-18100.
2025-03-18 22:01:56 +01:00
Ilija Tovilo
56841998de
Fix IN_ARRAY optimization
in_array() calls are compiled to frameless calls. Adjust the
optimization appropriately. Luckily, frameless opcodes simplify the
optimization quite a bit.

Fixes GH-18050
Closes GH-18066
2025-03-18 13:42:53 +01:00
Niels Dossche
647baec5a4
Fix GH-18090: DOM: Svg attributes and tag names are being lowercased
Closes GH-18091.
2025-03-17 19:45:50 +01:00
Jakub Zelenka
d4eb6a41b7
Merge branch 'PHP-8.3' into PHP-8.4 2025-03-17 14:52:04 +01:00
Jakub Zelenka
bd7d3c38ad
Get rid of atime change testing in bug72666_variation3.phpt 2025-03-17 14:49:22 +01:00
Ilija Tovilo
45fc03c190
Fix mysql test date flakiness
Separate date() calls can lead to diverging results.

Closes GH-18080
2025-03-16 14:26:04 +01:00
David Carlier
3bb3db5314
Merge branch 'PHP-8.3' into PHP-8.4 2025-03-15 11:37:56 +00:00
David Carlier
005c7b5797
ext/intl: Fix Uconverter::transcode with substitutes as references.
close GH-18059
2025-03-15 11:37:08 +00:00
David Carlier
946408251f
Merge branch 'PHP-8.3' into PHP-8.4 2025-03-15 11:34:30 +00:00
David Carlier
f34859cb90
ext/intl: Fix dateformat_format when the time is an array of references. 2025-03-15 11:33:17 +00:00
Saki Takamachi
e96a35b9a8
Fixed pdo_firebird_handle_factory to check ret when starting a transaction (#17632)
Changed to not execute php_firebird_begin_transaction
if transaction cannot be started successfully

Closes #17632
2025-03-15 08:51:49 +09:00
Niels Dossche
6717947ffe
Fix GH-18015: Error messages for ldap_mod_replace are confusing
Closes GH-18053.
2025-03-15 00:42:07 +01:00
Arnaud Le Blanc
4b9c72f329
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Destroy temporary module classes in reverse order
2025-03-14 10:49:10 +01:00
Arnaud Le Blanc
1c182674b0
Destroy temporary module classes in reverse order
We destroy classes of dl()'ed modules in clean_module_classes(), during
shutdown. Child classes of a module use structures of the parent class (such as
inherited properties), which are destroyed earlier, so we have a use-after-free
when destroying a child class.

Here I destroy classes in reverse order, as it is done in zend_shutdown() for
persistent classes.

Fixes GH-17961
Fixes GH-15367
2025-03-14 10:45:17 +01:00
Saki Takamachi
7c9872e255
Fixed pointer subtraction for scale (#17986)
Closes #17986
2025-03-14 09:00:00 +09:00
Niels Dossche
f4ba3564f5
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Correct check for maximum string length in JIT helpers
2025-03-13 23:49:42 +01:00
Niels Dossche
413938143b
Fix GH-18037: SEGV Zend/zend_execute.c
A frameless icall with 3 arguments is a special case because it uses
OP_DATA, but this was not added to the list, so the opline pointed to
the wrong address resulting in UBSAN report or crash.

Closes GH-18048.
2025-03-13 23:48:24 +01:00
Niels Dossche
a7d2703246
Correct check for maximum string length in JIT helpers
This is a bit of a theoretical issue, but the maximum string length is
actually ZSTR_MAX_LEN instead of SIZE_MAX. The resulting check is a bit
slower but should still be relatively cheap.

Closes GH-18049.
2025-03-13 23:47:45 +01:00
Niels Dossche
d43d4684bd
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18018: RC1 data returned from offsetGet causes UAF in ArrayObject
2025-03-13 19:11:24 +01:00
Niels Dossche
27affd8da1
Fix GH-18018: RC1 data returned from offsetGet causes UAF in ArrayObject
We should first check truthiness and only after that destroy the value.

Closes GH-18034.
2025-03-13 19:10:34 +01:00
Ilija Tovilo
e624364967
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix flaky connection count in mysqli test
2025-03-13 16:47:29 +01:00
Ilija Tovilo
276c2a67ef
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix flaky connection count in mysqli test
2025-03-13 16:47:20 +01:00
Ilija Tovilo
f390425db3
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix flaky connection count in mysqli test
2025-03-13 16:46:03 +01:00
Ilija Tovilo
00ebd2d7f2
Fix flaky connection count in mysqli test
Use connection ID instead of count to check whether we're using a
persistent connection. This allows the test to be run in parallel with
the other tests, but also protects against the possibility that some
other service connects to the mysql server.

Closes GH-18040
2025-03-13 16:40:33 +01:00
Remi Collet
5de019d9bd
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Relax test expectation for pcre2lib 10.45 Using e92848789a
2025-03-13 07:46:55 +01:00
Remi Collet
69480be12a
Relax test expectation for pcre2lib 10.45 Using e92848789a
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2025-03-13 07:46:18 +01:00
Dmitry Stogov
ae67eb0490
Update IR
IR commit: 8bb0acca45a7b0f12691f4258e41462599efbd74
2025-03-13 03:07:43 +03:00
David Carlier
7f771e1e87
Merge branch 'PHP-8.3' into PHP-8.4 2025-03-12 22:20:03 +00:00
David Carlier
c3fc94c4b8
ext/intl: fix locale_compose/locale_lookup to be able to deal with references.
close GH-18035
2025-03-12 22:18:34 +00:00
Niels Dossche
8156a89eff
Fix incorrectly merged bug75535.phpt
Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-03-11 23:06:28 +01:00
Tim Düsterhus
a8d3a80067
Fix GHSA-p3x9-6h7p-cgfc: libxml streams wrong content-type on redirect
libxml streams use wrong content-type header when requesting a
redirected resource.
2025-03-11 22:58:39 +01:00
Jakub Zelenka
6976fb6ba7
Merge branch 'PHP-8.3' into PHP-8.4 2025-03-11 22:23:09 +01:00
Jakub Zelenka
acf2f4988a
Merge branch 'PHP-8.2' into PHP-8.3 2025-03-11 22:09:00 +01:00