Commit Graph

139340 Commits

Author SHA1 Message Date
Ilija Tovilo
f0b4847100
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix i386 release build warning
2024-11-14 20:39:46 +01:00
Ilija Tovilo
9ca19e9c52
[skip ci] Merge branch 'PHP-8.4'
* PHP-8.4:
  UPGRADING: Fix `CURLOPT_TCP_KEEPCNT` entry
2024-11-14 20:38:56 +01:00
Ilija Tovilo
ec3de14afb
Fix i386 release build warning
Closes GH-16730
2024-11-14 20:36:23 +01:00
Ayesh Karunaratne
efe4fc9f99
UPGRADING: Fix CURLOPT_TCP_KEEPCNT entry 2024-11-14 23:33:03 +07:00
Christoph M. Becker
2d1c3825a8
Simplify WBMP imagecreatefromstring() detection (GH-16782)
According to the WBMP specification[1], the first field (type) of a
WBMP is a multi-byte integer, but only type `0` is supported.  Thus
there is no need to read a multi-byte integer.  The second field (fix
header) is a single byte; reading a multi-byte integer is not really
wrong, since the fix header field is laid out in a way which allows it
to be treated as such, but the check whether the MBI is greater than
or equal to zero is pretty useless, because negative values could only
be returned if overflow occurs (MBIs are unsigned).

So the only useful assumption we can make is that the first byte is
zero; we let `gdImageCreateFromWBMPCtx()` figure out the rest.

[1] <https://www.wapforum.org/what/technical/SPEC-WAESpec-19990524.pdf> section 6
2024-11-14 14:00:19 +01:00
Christoph M. Becker
d4103b3570
Remove superfluous determination of cURL version (GH-16787)
This was originally meant to distinguish between libcurl 7.59.0 and
earlier; only the latter would need to be linked against normalize.lib,
libssh2.lib and nghttp2.lib[1].  That would only have catered to our
builds, and might not have been correct anyway.  However, the version
check was wrong (paren error), and has been removed in the meantime[2].

Given that cURL 7.59.0 is rather old, we do not reinstate the version
check, but rather drop the now superfluous (and improper) determination
of the cURL version.  A nice bonus is that we get rid of some global
variables.

[1] <a1ba3007a4>
[2] <94a12d5b31>
2024-11-14 12:25:08 +01:00
Christoph M. Becker
3815a773a1
Close GH-16659: Bump ICU requirement to ICU >= 57.1
This requirements bump should rarely affect anybody in practice.  All
major distros already ship more recent ICU versions, and even for
Solaris 11, ICU 57.1 is available via OpenCSW.  Note that ICU 57.1 has
been released on 2016-03-23[1].

[1] <https://icu.unicode.org/download/57>

Closes GH-16688.
2024-11-14 01:30:48 +01:00
Christoph M. Becker
0db7e53b84
Merge branch 'PHP-8.4'
* PHP-8.4:
  Need to define BREW_OPT
2024-11-13 21:25:50 +01:00
Christoph M. Becker
f2dbad6f04
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Need to define BREW_OPT
2024-11-13 21:24:54 +01:00
Christoph M. Becker
d1f86bc8eb
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Need to define BREW_OPT
2024-11-13 21:24:20 +01:00
Christoph M. Becker
c69fdef760
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Need to define BREW_OPT
2024-11-13 21:23:56 +01:00
Christoph M. Becker
d6249b6e1f
Need to define BREW_OPT
This is only defined as of PHP-8.4; alternatively we could also inline
the `brew --prefix` call, but that makes it harder for upward merges.

Closes GH-16785.
2024-11-13 21:23:27 +01:00
Christoph M. Becker
fa3421cd10
Merge branch 'PHP-8.4'
* PHP-8.4:
  Patch libcurl.pc for macOS builds
2024-11-13 19:40:52 +01:00
Christoph M. Becker
3d07b9e771
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Patch libcurl.pc for macOS builds
2024-11-13 19:40:21 +01:00
Christoph M. Becker
4c74487912
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Patch libcurl.pc for macOS builds
2024-11-13 19:38:49 +01:00
Christoph M. Becker
45487c6ec2
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Patch libcurl.pc for macOS builds
2024-11-13 19:38:07 +01:00
Christoph M. Becker
9196a72eb0
Patch libcurl.pc for macOS builds
cURL 8.11.0 added a couple of packages to `Requires.private`, but these
packages are irrelevant when building against a shared libcurl.  For
some reason, these private requirements are checked when we're doing
`pkg-config --cflags` (that happens with the preinstalled pkg-config
0.29.2, as well as with pkgconf 2.3.0).  To avoid further messing with
these packages, we just drop the `Requires.private` line from
libcurl.pc.

See GH-16741 for more details.

Closes GH-16783.
2024-11-13 19:36:58 +01:00
Niels Dossche
28344e0445
Get rid of HASH_OF() in ext/dom (#16767)
The cases where this is used are only where an array is possible, so we
can replace them with Z_ARRVAL_P. This reduces some overhead.
2024-11-13 17:32:27 +01:00
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