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

139172 Commits

Author SHA1 Message Date
David Carlier
b948332779 Merge branch 'PHP-8.4' 2024-11-13 12:49:44 +00:00
David Carlier
ec05cd559b Merge branch 'PHP-8.3' into PHP-8.4 2024-11-13 12:49:13 +00:00
David Carlier
6f1d8368d8 Merge branch 'PHP-8.2' into PHP-8.3 2024-11-13 12:49:00 +00:00
David Carlier
4124b04e34 Fix GH-16771: imagecreatefromstring overflow on invalid format.
close GH-16776
2024-11-13 12:48:37 +00:00
David Carlier
53e5c09052 Merge branch 'PHP-8.4' 2024-11-13 12:12:25 +00:00
David Carlier
b8115d6c5e Fix GH-16769: php_pcntl_set_user_signal_infos aborts when a signal is a reference.
close GH-16772
2024-11-13 12:11:43 +00:00
Dmitry Stogov
7b029a318b Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix incorrect handling of ZEND_ACC_FINAL flag in JIT (#16778)
2024-11-13 14:43:54 +03:00
Dmitry Stogov
f6256fa2c0 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix incorrect handling of ZEND_ACC_FINAL flag in JIT (#16778)
2024-11-13 14:43:43 +03:00
Dmitry Stogov
b9c6f07713 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix incorrect handling of ZEND_ACC_FINAL flag in JIT (#16778)
2024-11-13 14:39:18 +03:00
Dmitry Stogov
19809a526b Fix incorrect handling of ZEND_ACC_FINAL flag in JIT (#16778) 2024-11-13 14:38:54 +03:00
Dmitry Stogov
3b115e6e9b Fix zend_jit_class_may_be_modified() fon non linked classes 2024-11-13 12:51:21 +03:00
David Carlier
33ba1a4ab9 ext/sockets: adding IPPROTO_ICMP* constants for socket creations.
Is to create socket for Internet Control Message Protocol context.
Due to their nature, they are meant to be used via
raw sockets rather than TCP/UDP.

close GH-16737
2024-11-12 18:52:22 +00:00
Niels Dossche
7202d119cd Fix parameter list generation in build/gen_stub.php (#16764)
[ci skip]

<variablelist> is not valid within <simpara>, this should not be wrapped
at all in a paragraph.
Regressed in 32789c0047.
2024-11-12 19:31:00 +01:00
Arnaud Le Blanc
a087442259 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix the name of the initializer parameter of ReflectionClass::resetAsLazyGhost()
2024-11-12 18:52:16 +01:00
Arnaud Le Blanc
a8151fc511 Fix the name of the initializer parameter of ReflectionClass::resetAsLazyGhost()
Closes GH-16758
2024-11-12 18:51:33 +01:00
Dmitry Stogov
b106feae71 Improve zend_jit_may_be_modified() check (#16760) 2024-11-12 13:41:49 +03:00
Niels Dossche
7f5a888bdb Change dom_node_is_read_only() to return bool (#16757)
Returning int or zend_result doesn't make sense, it's a yes/no question.
2024-11-11 20:57:52 +01:00
Calvin Buckley
cec9a98bc6 Clean up ODBC header (#16754)
Remove an unused field from globals, fix indentation.
2024-11-11 15:05:45 -04:00
Niels Dossche
dfba04e807 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16727: Opcache bad signal 139 crash in ZTS bookworm (frankenphp)
2024-11-11 16:20:44 +01:00
Niels Dossche
382be923ae Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16727: Opcache bad signal 139 crash in ZTS bookworm (frankenphp)
2024-11-11 16:20:39 +01:00
Niels Dossche
fbf4cec63b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16727: Opcache bad signal 139 crash in ZTS bookworm (frankenphp)
2024-11-11 16:20:30 +01:00
Niels Dossche
02ee521e20 Fix GH-16727: Opcache bad signal 139 crash in ZTS bookworm (frankenphp)
Reproducer: https://github.com/php/php-src/issues/16727#issuecomment-2466256317

The root cause is a data race between two different threads:

1) We allocate a lower cased name for an anonymous class here:
   f97353f228/Zend/zend_compile.c (L8109)
2) This gets looked up as an interned string here:
   f97353f228/Zend/zend_compile.c (L8112)
   Assuming that there are uppercase symbols in the string and therefore
   `lcname != name` and that `lcname` is not yet in the interned string table,
   the pointer value of `lcname` won't change.
3) Here we add the string into the interned string table:
   f97353f228/Zend/zend_compile.c (L8223)
   However, in the meantime another thread could've added the string into the interned string table.
   This means that the following code will run, indirectly called via the `LITERAL_STR` macro,
   freeing `lcname`: 62e53e6f49/ext/opcache/ZendAccelerator.c (L572-L575)
4) In the reproducer we then access the freed `lcname` string here:
   f97353f228/Zend/zend_compile.c (L8229)

This is solved in my patch by retrieving the interned string pointer
and putting it in `lcname`.

Closes GH-16748.
2024-11-11 16:20:05 +01:00
Gina Peter Banyard
234219dc33 ext/phar: Refactor phar_call_openssl_signverify() 2024-11-11 15:00:08 +00:00
Gina Peter Banyard
2684a5ef91 ext/phar: Fix test that is only run when ext/openssl is not built 2024-11-11 15:00:08 +00:00
Gina Peter Banyard
7ba978806b ext/intl: Refactor internal callable handling for UConverter (#16749) 2024-11-11 14:16:12 +00:00
Gina Peter Banyard
573ad05a8d Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/standard: Sync parameter names for fpow() to be identical to pow()
2024-11-11 13:07:02 +00:00
Gina Peter Banyard
e7891838a1 ext/standard: Sync parameter names for fpow() to be identical to pow()
Closes GH-16751
2024-11-11 13:04:46 +00:00
Gina Peter Banyard
53df3ae1e5 ext/curl: Use Z_ARRVAL_P instead of HASH_OF
We already check in advance that it is an array
2024-11-10 21:45:24 +00:00
Gina Peter Banyard
23b8d64cf7 Zend: Minor refactorings to zend_exceptions() (#16684) 2024-11-10 21:44:30 +00:00
Gina Peter Banyard
b48fdcb6e6 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/hash: Fix deprecation message output for new tests
2024-11-10 20:35:04 +00:00
Gina Peter Banyard
883d3c8113 ext/hash: Fix deprecation message output for new tests 2024-11-10 20:34:45 +00:00
Gina Peter Banyard
46431487f7 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/hash: Fix GH-16711: Segfault in mhash()
  ext/hash: Add failing tests for GH-16711
2024-11-10 20:17:28 +00:00
Gina Peter Banyard
c1d67c2415 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/hash: Fix GH-16711: Segfault in mhash()
  ext/hash: Add failing tests for GH-16711
2024-11-10 20:17:09 +00:00
Gina Peter Banyard
f01bafc340 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/hash: Fix GH-16711: Segfault in mhash()
  ext/hash: Add failing tests for GH-16711
2024-11-10 20:16:33 +00:00
Gina Peter Banyard
1b379f5e55 ext/hash: Fix GH-16711: Segfault in mhash()
Closes GH-16713
2024-11-10 20:15:44 +00:00
Gina Peter Banyard
fc8f30d312 ext/hash: Add failing tests for GH-16711 2024-11-10 20:14:21 +00:00
Christoph M. Becker
067ac63196 Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix MYSQLND_HAVE_SSL preprocessor help texts
2024-11-10 20:41:35 +01:00
Peter Kokot
41347f017b [skip ci] Fix MYSQLND_HAVE_SSL preprocessor help texts
The MYSQLND_HAVE_SSL indicate that mysqlnd has extended SSL support
enabled through either OpenSSL when building with Autotools, and through
crypt32 library on Windows.

Fixes https://github.com/php/php-src/pull/15164#discussion_r1803834585

Closes GH-16474.
2024-11-10 20:41:06 +01:00
DanielEScherzer
62e53e6f49 Inline and remove reflection_instantiate() (#16739)
Since the return value is never used, the only difference between using this
method and using `object_init_ex()` directly is the flipped order of
parameters, and the added level of indirection - remove that level of
indirection by replacing its uses.
2024-11-09 17:40:45 +01:00
Niels Dossche
4e21e80400 Merge branch 'PHP-8.4'
* PHP-8.4:
  [ci skip] Add credit for test
2024-11-09 17:10:07 +01:00
Niels Dossche
896eb80d07 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [ci skip] Add credit for test
2024-11-09 17:09:59 +01:00
Niels Dossche
f97353f228 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Add credit for test
2024-11-09 17:09:51 +01:00
Niels Dossche
d87f3ff662 [ci skip] Add credit for test 2024-11-09 17:09:35 +01:00
Niels Dossche
37d53d5a04 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16695: phar:// tar parser and zero-length file header blocks
2024-11-09 17:08:55 +01:00
Niels Dossche
c6d7d07a1d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16695: phar:// tar parser and zero-length file header blocks
2024-11-09 17:08:49 +01:00
Niels Dossche
58f4b45bca Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16695: phar:// tar parser and zero-length file header blocks
2024-11-09 17:08:19 +01:00
Niels Dossche
72c0222926 Fix GH-16695: phar:// tar parser and zero-length file header blocks
There are two issues:
1) There's an off-by-one in the check for the minimum file size for a
   tar (i.e. `>` instead of `>=`).
2) The loop in the tar parsing parses a header, and then unconditionally
   reads the next one. However, that doesn't necessarily exist.
   Instead, we remove the loop condition and check for the end of the
   file before reading the next header. Note that we can't use
   php_stream_eof as the flag may not be set yet when we're already at
   the end.

Closes GH-16700.
2024-11-09 17:07:53 +01:00
Niels Dossche
89e750a201 Fix macOS CI
Install curl via brew.

Closes GH-16735.

Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de>
2024-11-09 15:34:37 +01:00
DanielEScherzer
54003aecc4 Fix description of ReflectionParameter::getPosition() (GH-16738)
Appears to have been copied from `ReflectionParameter::isOptional()`.

[skip ci]
2024-11-09 15:32:53 +01:00
Christoph M. Becker
07d4c541cb Merge branch 'PHP-8.4'
* PHP-8.4:
  Fail early in *nix build script
2024-11-09 14:10:15 +01:00