1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

134882 Commits

Author SHA1 Message Date
Niels Dossche
54eab7b3cf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16292: Segmentation fault in ext/xmlreader/php_xmlreader.c:1282
2024-10-08 20:57:54 +02:00
Niels Dossche
5c1249391b Fix GH-16292: Segmentation fault in ext/xmlreader/php_xmlreader.c:1282
3 issues:
1) RETURN_NULL() was used via the macro NODE_GET_OBJ(), but the function
   returns false on failure and cannot return null according to its
   stub.
2) The struct layout of the different implementors of libxml only
   guarantees overlap between the node pointer and the document
   reference, so accessing the std zend_object may not work.
3) DOC_GET_OBJ() wasn't using ZSTR_VAL().

Closes GH-16307.
2024-10-08 20:54:07 +02:00
Jakub Zelenka
6f868bd6db PHP-8.3 is now for PHP-8.3.14-dev 2024-10-08 19:21:43 +01:00
Sergey Panteleev
67af5b55aa Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.26-dev

# Conflicts:
#	Zend/zend.h
#	configure.ac
#	main/php_version.h
2024-10-08 19:56:00 +05:00
Sergey Panteleev
5f5824015c PHP-8.2 is now for PHP 8.2.26-dev 2024-10-08 19:53:22 +05:00
Niels Dossche
2fe8c4a4fc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16261: Reference invariant broken in mb_convert_variables()
2024-10-07 17:49:24 +02:00
Niels Dossche
bf70d9ba0d Fix GH-16261: Reference invariant broken in mb_convert_variables()
The behaviour is weird in the sense that the reference must get
unwrapped. What ended up happening is that when destroying the old
reference the sources list was not cleaned properly. We add handling for
that. Normally we would use use ZEND_TRY_ASSIGN_STRINGL but that doesn't
work here as it would keep the reference and change values through
references (see bug #26639).

Closes GH-16272.
2024-10-07 17:46:06 +02:00
Niels Dossche
932406a146 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16259: Soap segfault when classmap instantiation fails
2024-10-07 17:42:54 +02:00
Niels Dossche
71222f799d Fix GH-16259: Soap segfault when classmap instantiation fails
Instantiation failure checks were missing.

Closes GH-16273.
2024-10-07 17:42:27 +02:00
Niels Dossche
0338008852 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed GH-16233: Observer segfault when calling user function in internal function via trampoline
2024-10-07 17:17:27 +02:00
Niels Dossche
e715dd0afb Fixed GH-16233: Observer segfault when calling user function in internal function via trampoline
In the test, I have an internal `__call` function for `_ZendTestMagicCallForward` that calls the global function with name `$name` via `call_user_function`.
Note that observer writes the pointer to the previously observed frame in the last temporary of the new call frame (`*prev_observed_frame`).

The following happens:
First, we call `$test->callee`, this will be handled via a trampoline with T=2 for the two arguments. The call frame is allocated at this point. This call frame is not observed because it has `ZEND_ACC_CALL_VIA_TRAMPOLINE` set. Next we use `ZEND_CALL_TRAMPOLINE` to call the trampoline, this reuses the stack frame allocated earlier with T=2, but this time it is observed. The pointer to the previous frame is written outside of the call frame because `T` is too small (should be 3). We are now in the internal function `_ZendTestMagicCallForward::__call` where we call the global function `callee`. This will push a new call frame which will overlap `*prev_observed_frame`. This value gets overwritten by `zend_init_func_execute_data` when `EX(opline)` is set because `*prev_observed_frame` overlaps with `EX(opline)`. From now on, `*prev_observed_frame` is corrupted. When `zend_observer_fcall_end` is called this will result in reading wrong value `*prev_observed_frame` into `current_observed_frame`. This causes issues in `zend_observer_fcall_end_all` leading to the segfault we observe.

Despite function with `ZEND_ACC_CALL_VIA_TRAMPOLINE` not being observed, the reuse of call frames makes problems when `T` is not large enough.
To fix this, we make sure to add 1 to `T` if `ZEND_OBSERVER_ENABLED` is true.

Closes GH-16252.
2024-10-07 17:16:43 +02:00
Arnaud Le Blanc
a774704aaf NEWS for GH-16196 2024-10-07 15:04:13 +02:00
Arnaud Le Blanc
498e88489e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  NEWS for GH-16196
  Handle references properties of the Exception class
2024-10-07 15:03:55 +02:00
Arnaud Le Blanc
df4db5c1b4 NEWS for GH-16196 2024-10-07 15:03:43 +02:00
Arnaud Le Blanc
c2115a43e3 Handle references properties of the Exception class
Fixes GH-16188
Closes GH-16196
2024-10-07 15:03:31 +02:00
David Carlier
7c43f68c98 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-07 13:05:32 +01:00
David Carlier
a2bdfeff4f Fix GH-16257 imagescale underflow on RGB channels.
backport of 948bb0a5c2

close GH-16257
2024-10-07 13:05:05 +01:00
Christoph M. Becker
424fb2c3fc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Install 32bit Firebird server on x86
2024-10-07 01:35:29 +02:00
Christoph M. Becker
c3434091de Install 32bit Firebird server on x86
php_pdo_firebird.dll depends on fbclient.dll, which is shipped with the
server.  However, a 64bit Firebird server ships a 64bit fbclient.dll,
which is not compatible with a 32bit php_pdo_firebird.dll.

Closes GH-16223.
2024-10-07 01:34:54 +02:00
Christoph M. Becker
cebb5f0307 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix failing openssl_private_decrypt tests
  Update Windows CI to use php-sdk-2.3.0
2024-10-07 01:08:09 +02:00
Christoph M. Becker
d49c92ff00 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix failing openssl_private_decrypt tests
  Update Windows CI to use php-sdk-2.3.0
2024-10-07 01:07:04 +02:00
Jakub Zelenka
53cc92c85c Fix failing openssl_private_decrypt tests
We backport 11caf094f1af6b47ea2138c5fa907838911ebe01[1] as a step to
get back to a green CI.

[1] <11caf094f1>
2024-10-07 01:06:04 +02:00
Christoph M. Becker
d9d82377cc Update Windows CI to use php-sdk-2.3.0
php-sdk-2.2.0 still fetches dependencies from the no longer up to date
<https://windows.php.net/downloads/php-sdk/deps/>, and as such won't be
tested with any security updates we provide for Windows.  Given that
PHP 8.1 is going to receive security updates for further 15 months, we
should should not ignore these dependency updates.

Closes GH-16097.
2024-10-07 01:05:47 +02:00
Jakub Zelenka
05bbbe593b Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 21:25:01 +01:00
Jakub Zelenka
4c76509f82 Fix extra spaces in NEWS [skip ci] 2024-10-06 21:23:45 +01:00
Jakub Zelenka
59816b9a73 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 19:40:24 +01:00
Jakub Zelenka
5a47f27021 Fix GH-15395: php-fpm: zend_mm_heap corrupted with cgi-fcgi request
Closes GH-16227

Co-authored-by: David Carlier <devnexen@gmail.com>
2024-10-06 19:37:55 +01:00
David Carlier
2af32659b3 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 19:25:59 +01:00
David Carlier
8537aa687e Fix GH-16267 socket_strerror overflow on argument value.
only socket_strerror provides user-supplied value to sockets_strerror
handler.

close GH-16270
2024-10-06 19:25:38 +01:00
David Carlier
ac675744ab Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 18:07:35 +01:00
David Carlier
e3015de741 Fix GH-16234 jewishtojd overflow on year argument.
close GH-16243
2024-10-06 18:07:11 +01:00
Niels Dossche
2dbc605686 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16256: Assertion failure in ext/soap/php_encoding.c:460
2024-10-06 18:02:19 +02:00
Niels Dossche
922b9d6798 Fix GH-16256: Assertion failure in ext/soap/php_encoding.c:460
The class map must be an associative array, not a packed array.

Closes GH-16269.
2024-10-06 18:01:50 +02:00
Niels Dossche
bd8495ef93 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add SKIPIF for ZendMM for observer_fiber_functions_03.phpt
2024-10-06 18:00:43 +02:00
Niels Dossche
fbb1001d84 Add SKIPIF for ZendMM for observer_fiber_functions_03.phpt
This test uses memory_limit, so it fails when using USE_ZEND_ALLOC=0.
2024-10-06 18:00:33 +02:00
Niels Dossche
66cb6cd3a7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix Soap leaking http_msg on error
2024-10-06 17:58:51 +02:00
Niels Dossche
a9dada29e7 Fix Soap leaking http_msg on error
Testing all cases is not so easy to do as we would need a server that
redirects from e.g. http to https while SSL is not available.

Closes GH-16254.
2024-10-06 17:58:28 +02:00
David Carlier
e8b73c4f3a Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 16:42:38 +01:00
David Carlier
a5e8ac62d9 Fix GH-16258 overflow on jddayofweek argument.
close GH-16263
2024-10-06 16:41:59 +01:00
David Carlier
fde5e507f6 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 11:01:57 +01:00
David Carlier
2d05da2e94 Fix GH-16260: overflow/underflow on imagerotate degrees argument.
close GH-16264
2024-10-06 11:01:17 +01:00
David Carlier
664689aa00 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-05 19:33:40 +01:00
David Carlier
6d9903f3e6 fix build warning for GH-16228
close GH-16250
2024-10-05 19:33:25 +01:00
Gina Peter Banyard
88a6a39642 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Cirrus CI: Skip on doc changes
2024-10-05 13:18:59 +01:00
Gina Peter Banyard
4b855eba15 [skip ci] Cirrus CI: Skip on doc changes
Closes GH-16203
2024-10-05 13:18:39 +01:00
Niels Dossche
eb02ad08da Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16237: Segmentation fault when cloning SoapServer
2024-10-05 14:13:55 +02:00
Niels Dossche
809a58bc1b Fix GH-16237: Segmentation fault when cloning SoapServer
Bisect points to 94ee4f9, however this only reveals the problem.
Cloning an object on a lower branch and trying to call its methods
crashes as well. Cloning the object shouldn't be possible in the first
place because there's an engine constraint that when we have a new
object handler we should also have a clone handler. This constraint is
not fulfilled here.

Closes GH-16245.
2024-10-05 14:13:29 +02:00
David Carlier
2863d8214f Merge branch 'PHP-8.2' into PHP-8.3 2024-10-05 13:09:43 +01:00
David Carlier
a3ff092c12 Fix GH-16228 overflow on easter_days/easter_date year argument.
close GH-16241
2024-10-05 13:08:43 +01:00
David Carlier
8ff179529a Merge branch 'PHP-8.2' into PHP-8.3 2024-10-05 11:34:49 +01:00