Commit Graph

131785 Commits

Author SHA1 Message Date
Gina Peter Banyard
3c45152798
ext/gd: Fix [-Wcalloc-transposed-args] compiler warning 2024-05-21 12:17:25 +01:00
Gina Peter Banyard
554541c4db
ext/ffi: Fix [-Wenum-int-mismatch] compiler warning 2024-05-21 12:17:25 +01:00
Gina Peter Banyard
d775ba8804
ext/bcmath: Fix [-Wenum-int-mismatch] compiler warning 2024-05-21 12:17:25 +01:00
Niels Dossche
98288a27bc
Skip .NET tests if mscoree is not available (#14281) 2024-05-20 23:26:52 +02:00
Saki Takamachi
0a8fbef996
Added test 2024-05-20 15:13:53 +01:00
Derick Rethans
e5cb9d7df9
Force ffp-contract to off 2024-05-20 15:13:53 +01:00
Niels Dossche
ad5138a341
Fix undefined behaviour in fastcgi.c (#14269)
Arithmetic on NULL pointers is undefined.
2024-05-19 22:54:06 +02:00
Kamil Tekiela
a59868aef8
Clear mysql error in fetch_into
Closes GH-14256
2024-05-17 13:08:42 +02:00
Niels Dossche
02b7d70fa9
Fix nightly test failure (#14251)
The created files have the same filename, creating conflicts. Fix this
by adding a unique suffix.
2024-05-16 20:00:46 +02:00
Marcus Xavier
32d21af296
Fix GH-14100: Corrected spelling mistake in php.ini files.
Closes GH-14138.
2024-05-15 19:46:52 +02:00
Niels Dossche
ebd1a36670
Fix GH-14215: Cannot use FFI::load on CRLF header file with apache2handler
Some modules may reset _fmode, which causes mangling of line endings.
Always be explicit like we do in other places where the native open call
is used.

Closes GH-14218.
2024-05-14 19:49:22 +02:00
Niels Dossche
719fa46150
Fix Windows SKIPIF (#14219)
PHP_OS_FAMILY never has the value WIN, for Windows platforms it is the
string "Windows". As such, this test was never executed. Fix this.
2024-05-13 22:09:47 +02:00
Ilija Tovilo
fa7933ef17
[skip ci] Fix typo 2024-05-13 13:08:28 +02:00
Ilija Tovilo
91c53e43c4
[skip ci] Adjust port for gh13860.phpt
Port 64325 is already used in ext/standard/tests/streams/gh11418.phpt. The test
randomly times out, and it's unclear whether it might be related to the
conflicting port.
2024-05-13 12:16:57 +02:00
Benjamin Cremer
5b6cda6523
Fix GH-14175: Use two digit float specifier for FPM systemd format req rate
Close GH-14175
2024-05-12 13:30:29 +01:00
Niels Dossche
1e2a2d7df2
Fix crash in ParentNode::append() when dealing with a fragment containing text nodes
Credits for test: https://github.com/PhpGt/Dom/pull/454.

Closes GH-14206.
2024-05-12 02:00:31 +02:00
Niels Dossche
1890d47c51
Fix missing deref in C14N (#14203)
Follow-up for 30a0b0359e, which didn't fix
all places. This is the last remaining place.
2024-05-11 17:12:20 +02:00
Calvin Buckley
239003e01d Update NEWS for ICU regression fix 2024-05-10 15:33:19 -03:00
Calvin Buckley
4e21a26db2
Fix check for newer versions of ICU (#14186)
* Fix check for newer versions of ICU

The previous test would always trigger, even if the version of ICU
installed didn't require C++17. This was because it incorrectly used
the `test` program, which broke the build on systems without a C++17
compiler.

Tested with macOS 14 and i 7.2.

* Fix broken ICU version check for definition

Same as the previous fix for C++17.

---------

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-05-10 14:20:17 -03:00
Niels Dossche
217b753a3d
Fix GH-14189: PHP Interactive shell input state incorrectly handles quoted heredoc literals.
Only `'` was handled, no handling case for `"` existed. Simply add it so
the heredoc tag is set up correctly.

Closes GH-14195.
2024-05-10 16:48:26 +02:00
Niels Dossche
15813d69a5
Fix GH-14183: XMLReader::open() can't be overridden
We should only return the override if the internal static method is matched.

Closes GH-14194.
2024-05-10 15:57:09 +02:00
Saki Takamachi
12dc51976b
ext/hash: Swap the checking order of __has_builtin and __GNUC__ (#14185)
closes #14185
2024-05-10 09:37:13 +09:00
Tim Düsterhus
b8aa68bc09
CI: Do not save the ccache for PRs (#14168)
Resolves #14155
2024-05-07 20:52:10 +02:00
Dmitry Stogov
7a9e0fb39b
Fix incorrect inheritance of private trait methods (#14163)
The bug was introduced in c6b75f9328
2024-05-07 13:16:23 +03:00
Dmitry Stogov
c6b75f9328
Fix prototype for trait methods (#14148)
* Fix prototype for trait methods

Fixes GH-14009

* Clenup do_inheritance_check_on_method()

Remove wierd checks and define the behavior by explicit set of flags

* Fix naming and indentation

---------

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-05-06 21:39:30 +03:00
Ilija Tovilo
42ede5597e
Fix persisting of inherited class constants
Class constants are inherited to user classes without cloning. Thus, internal
class constants should not be persisted at all. Simply keep pointing to the
internal class constant.

Fixes GH-14109
Closes GH-14114
2024-05-06 16:00:48 +02:00
Ilija Tovilo
f8d1864bbb
Delay #[Attribute] arg validation until runtime
Fixes GH-13970
Closes GH-14105

We cannot validate at compile-time for multiple reasons:

* Evaluating the argument naively with zend_get_attribute_value can lead to code
  execution at compile time through the new expression, leading to possible
  reentrance of the compiler.
* Even if the evaluation was possible, it would need to be restricted to the
  current file, because constant values coming from other files can change
  without affecting the current compilation unit. For this reason, validation
  would need to be repeated at runtime anyway.
* Enums cannot be instantiated at compile-time (the actual bug report). This
  could be allowed here, because the value is immediately destroyed. But given
  the other issues, this won't be needed.

Instead, we just move it to runtime entirely. It's only needed for
ReflectionAttribute::newInstance(), which is not particularly a hot path. The
checks are also simple.
2024-05-06 12:38:56 +02:00
Dmitry Stogov
f0356612d9
Fix undefined behavior (left shift of negative number)
Fixes oss-fuzz #68722
2024-05-06 09:49:41 +03:00
Niels Dossche
427c244168
Fix GH-14124: Segmentation fault on unknown address 0x0001ffff8041 with XML extension under certain memory limit (#14126)
The ltags were not initialized, so when an OOM happens before the new value is written, uninitialized data is used.
2024-05-04 14:05:24 +02:00
Saki Takamachi
3237b8f471
CI: fix oci setup (#14123)
closes #14123
2024-05-04 17:47:27 +09:00
Matteo Beccati
6fed9a9a7e
Stick to mysql 8.3 for the time being
MySQL 8.4 does not load the 'mysql_native_password' plugin by default
and I couldn't figure out how to initialise the container to load it.
2024-05-02 19:53:05 +02:00
Peter Kokot
b6b9eab68e
Fix tests for glibc 2.39 (#14097)
2.39 has fixed inconsistent (mon_)grouping formats in localedata:

* https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;hb=refs/tags/glibc-2.39#l237
* https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/locales/en_AU;hb=refs/tags/glibc-2.39#l65

For en_AU locale now it returns array of 1 item instead of 2 for
grouping and mon_grouping.

Since this is upstream change depending on the system, this only syncs
tests for such case.
2024-05-01 20:43:00 +02:00
David Carlier
74843947f4
sapi/cgi: fix buffer limit on windows.
MSDN recommends dropping the deprecated `read` in favor of `_read`.
Also, the buffer size limit is INT_MAX.

Close GH-14022
2024-05-01 13:58:53 +01:00
Niels Dossche
2dbe2d62b3
Fix crash when calling childNodes next() when iterator is exhausted
Closes GH-14091.
2024-04-30 22:30:58 +02:00
Niels Dossche
30a0b0359e
Fix references not handled correctly in C14N
Closes GH-14090.
2024-04-30 22:30:28 +02:00
Niels Dossche
e878b9f390
Fix crashes when entity declaration is removed while still having entity references
libxml doesn't do reference counting inside its node types. It's
possible to remove an entity declaration out of the document, but then
entity references will keep pointing to that stale declaration. This
will cause crashes.

One idea would be to check when a declaration is removed, to trigger a
hook that updates all references. However this means we have to keep
track of all references somehow, which would be a high-overhead
solution. The solution in this patch makes sure that the fields are
always updated before they are read.

Closes GH-14089.
2024-04-30 22:29:44 +02:00
Ilija Tovilo
d670e131df
Fix __SANITIZE_ADDRESS__ redeclaration warning 2024-04-29 16:13:49 +02:00
Sergey Panteleev
3b5321dffe
PHP-8.2 is now for PHP 8.2.20-dev 2024-04-23 17:22:54 +03:00
Peter Kokot
44775b7617
Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
This is addon to the GH-13727 bug fix. When configuring the build with:

  ./configure CFLAGS=-Werror=strict-prototypes

libtool check for parsing nm command would fail:

  checking command to parse /usr/bin/nm -B output from cc object... failed

Upstream libtool has this specific check already fixed. Note that this
works only with Autoconf version 2.72 and later and is preparation for
future compilers that might have this error enabled by default.
2024-04-22 21:21:40 +02:00
SATO Kentaro
f8b9030b4e
Temporary reset filename and lineno override before autoload
Closes GH-10232
Closes GH-13313
2024-04-22 10:56:45 +02:00
Peter Kokot
7d3d8de1f3
Fix erroneous dnl appended in configure (#14013)
This is a backport of commit 03f15534a1 to
PHP-8.2 due to GH-14002 and fixes the PHP_CXX_COMPILE_STDCXX check in
ext/intl whether the specified C++ standard is mandatory or optional.

The `dnl` (Discard to Next Line) M4 macro in this combination of `m4_if`
macros and arguments isn't properly replaced and a literal `dnl` string
is appended in the configure script. The `[]dnl` works ok.
2024-04-21 17:23:22 +02:00
Ilija Tovilo
891e4a5a34
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Backport 0e7ef95 and 4f0d4c0
2024-04-21 16:12:18 +02:00
Ilija Tovilo
469ad32581
[skip ci] Backport 0e7ef95 and 4f0d4c0 2024-04-21 16:11:55 +02:00
David Carlier
42443b4c2e
ext/session: fix _read/_write buffer limit.
MSDN pages mention the buffer size upper limit is INT_MAX not UINT_MAX.
inspired by GH-13205.

Close GH-14017
2024-04-20 17:11:03 +01:00
Saki Takamachi
2a1aa8cac5
Fix GH-13998: Manage refcount of agg_context->val correctly (#14004)
When step_callback fails, agg_context->val is passed dtor, but agg_context->val
is also used in final_callback regardless of the success/failure of step_callback,
so should not call dtor.

closes #14004
fixes #13998
2024-04-20 22:33:25 +09:00
Ilija Tovilo
b3e26c3036
Fix missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls()
Fixes GH-14003
2024-04-19 20:04:51 +02:00
Jakub Zelenka
04b864e566
Fix GH-13806: openssl_x509_parse_basic test fails with OpenSSL 3.2+ (#13961)
Closes GH-13961
2024-04-19 14:09:22 +01:00
David Carlier
cc46a4e6b5
ext/intl: level up c++ runtime std for icu 74 and onwards.
to align with what is required to build icu 74 itself.

Close GH-14002
2024-04-19 10:04:25 +01:00
Saki Takamachi
fda91a0543
Fix GH-13984: Buffer size is now checked before memcmp (#13991)
Fixed an issue where a buffer overflow occurred when a string shorter than
`:memory:` was passed as the db name of pdo_sqlite.

fixed #13984
closes #13991
2024-04-18 08:35:50 +09:00
Ilija Tovilo
1acd7a0919
Add missing COMPILE_IGNORE_OTHER_FILES check for static calls
Closes GH-13986
2024-04-17 22:39:05 +02:00