Commit Graph

136720 Commits

Author SHA1 Message Date
Niels Dossche
e4904a2199
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix test conflict between gzfile_basic.phpt and gzfile_basic2.phpt
2024-07-06 01:59:46 +02:00
Niels Dossche
7c970f063f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test conflict between gzfile_basic.phpt and gzfile_basic2.phpt
2024-07-06 01:59:40 +02:00
Niels Dossche
1e5f46fb20
Fix test conflict between gzfile_basic.phpt and gzfile_basic2.phpt
[ci skip]

This should fix the nightly failure.
2024-07-06 01:59:32 +02:00
Arnaud Le Blanc
2269c06042
Fix stack limit under valgrind (#14818)
Valgrind creates a stack mapping that can grow up to RLIMIT_STACK, but the last
page is never useable
2024-07-05 17:09:45 +02:00
Peter Kokot
83cd1c241e
Autotools: Refactor mach_vm_read check in FPM (#14830)
- Check wrapped in AC_CACHE_CHECK
- Synced CS
2024-07-05 15:19:14 +02:00
Peter Kokot
d7ddf83dde
Autotools: Refactor AVX-512 checks (#14831)
* Autotools: Refactor AVX-512 checks

- CS synced
- checks wrapped in AC_CACHE_CHECK
- CPP macros PHP_HAVE_AVX512_SUPPORTS and PHP_HAVE_AVX512_VBMI_SUPPORTS
  are now either defined to 1 or undefined to avoid manual defining on
  Windows (previously they should be either 0 or 1)

* [skip ci] Add basic macros help texts
2024-07-05 15:18:26 +02:00
Peter Kokot
fbc329733c
Autotools: Move crypt_r check (#14832)
The crypt_r() function is required and check can error out separately.
2024-07-05 13:14:48 +02:00
Peter Kokot
955c2e60eb
Autotools: Add ZEND_ENABLE_STATIC_TSRMLS_CACHE to skeleton (#14827)
This enables "Thread Safety Resource Manager Local Storage" static
cache for skeleton template for Autotools build.
2024-07-05 12:52:49 +02:00
Peter Kokot
27879fb5d5
Fix GH-14798: Valgrind and address sanitizer are not compatible (#14826)
When configuring PHP with:

    ./configure --with-valgrind and --enable-address-sanitizer

configuration now errors now since these two are not compatible
configurations.
2024-07-05 12:03:21 +02:00
Christoph M. Becker
ffab987fb1
Update MSVC compiler version detection (#14810)
As of Visual Studio 2015, the major version of the compiler (`cl.exe`)
is 19, and the minor version increases by steps of 10.  However, the
latest Visual Studio 2022 release has the version `19.40`, so that
Visual Studio version is not properly detected.  This is not a big deal
regarding the reported compiler version (`php -v` etc.), but the
filenames of the builds would no longer match the expectations (instead
of `vs17` there is now `19.40.33811` or another build number).  This
implies that the files would have to be renamed manually to be properly
handled by windows.php.net (or that code would have to be adapted).

Therefore we update the version detection to detect all versions < 1950
as Visual Studio 2022, assuming that "For major releases, the minor
version increases by 10."[1] still holds in the future.

[1] <https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170#visual-studio-2017-and-later>
2024-07-05 11:25:32 +02:00
Peter Kokot
ae420538d2
Autotools: Refactor PHP_BROKEN_GCC_STRLEN_OPT (#14824)
- Synced CS
- Cache variable ac_cv_have_broken_gcc_strlen_opt renamed to
  php_cv_have_broken_gcc_strlen_opt
2024-07-05 10:37:49 +02:00
Peter Kokot
dccc911c04
Autotools: Refactor PHP_TIME_R_TYPE check (#14823)
- Synced CS
- Cache variable ac_cv_time_r_type renamed to php_cv_time_r_type
2024-07-05 10:37:28 +02:00
Peter Kokot
cc7cfcef08
Autotools: Refactor PHP_FPM_BUILTIN_ATOMIC (#14825)
- Check wrapped in AC_CACHE_CHECK
- Synced CS
- Since this can be also compiler agnostic check, "gcc" text replaced
  with "compiler"
2024-07-05 09:42:44 +02:00
Peter Kokot
17a53470d7
Autotools: Refactor PHP_FPM_LQ checks (#14828)
- CS synced
- checks wrapped in AC_CACHE_CHECH
- HAVE_LQ_SO_LISTENQ defined unconditionally for simplifications
2024-07-05 09:41:50 +02:00
Arnaud Le Blanc
a62eda3f88
Fix stack limit on MSAN (#14829) 2024-07-05 01:52:42 +02:00
Peter Kokot
1a380989ee
Remove HAVE_STRPTIME_DECL_FAILS (#14821)
The strptime, where available, needs the _GNU_SOURCE defined or compiler
flag -std=gnuXX appended to be declared in time.h. PHP's strptime is
also deprecated as of PHP 8.1.

This removes the HAVE_STRPTIME_DECL_FAILS in favor of a simpler
AC_CHECK_DECL check and HAVE_DECL_STRPTIME CPP macro.
2024-07-04 20:26:14 +02:00
Peter Kokot
94dc2d2bf3
Autotools: Refactor crypt_r style check (#14820)
- Over-quoted arguments reduced
- AS_VAR_IF and CS synced
- CPP macro help texts updated
2024-07-04 20:18:39 +02:00
Peter Kokot
acac365d95
Autotools: Refactor PHP_TEST_WRITE_STDOUT check (#14819)
- AS_VAR_IF, AS_CASE used, CS synced
- Over-quoted argument reduced
- Cache variable ac_cv_write_stdout renamed to php_cv_have_write_stdout
- CPP macro help text updated
2024-07-04 19:32:31 +02:00
Niels Dossche
c69dedabb2
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14553: Bug in phpdbg8.3 (also 8.1 and 8.2) echo output - trimmed at NULL byte (?)
2024-07-04 18:44:29 +02:00
Niels Dossche
751c267850
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14553: Bug in phpdbg8.3 (also 8.1 and 8.2) echo output - trimmed at NULL byte (?)
2024-07-04 18:44:17 +02:00
Niels Dossche
95889979f2
Fix GH-14553: Bug in phpdbg8.3 (also 8.1 and 8.2) echo output - trimmed at NULL byte (?)
This broke in 6318040df2 when phpdbg
stopped using its custom printing routines. By relying on standard
printing routines, the embedded NUL bytes are causing the strings to be
cut off, even when using %.*s. Solve this by going straight to the
output routine, which is what the printf routine would've done anyway.

Closes GH-14822.
2024-07-04 18:43:42 +02:00
Niels Dossche
bcfdf10686
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13688: Test curl_basic_008 can fail (#13693)
2024-07-04 18:09:16 +02:00
Niels Dossche
9e476775e2
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13688: Test curl_basic_008 can fail (#13693)
2024-07-04 18:09:09 +02:00
Niels Dossche
39ed9993f7
Fix GH-13688: Test curl_basic_008 can fail (#13693)
.invalid is a reserved TLD that should never be caught.
2024-07-04 18:07:54 +02:00
Christoph M. Becker
de354683a0
Make bug49278.phpt more resilient
Due to the hard-coded PHP version, that test easily fails[1], so we
relax the test expectations.

[1] e.g. <https://github.com/cmb69/php-ftw/actions/runs/9784934000/job/27016894692#step:5:66>

Closes GH-14817.
2024-07-04 16:03:15 +02:00
Niels Dossche
0fb12385fb
Merge branch 'PHP-8.3'
* PHP-8.3:
  NEWS for GH-14814
  ext/standard/tests: strings/wordwrap_memory_limit_32bit.phpt has two outputs
  ext/standard/tests: 32bit wordwrap tests aren't just for Windows
2024-07-04 15:56:48 +02:00
Niels Dossche
7ee7492f30
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  NEWS for GH-14814
  ext/standard/tests: strings/wordwrap_memory_limit_32bit.phpt has two outputs
  ext/standard/tests: 32bit wordwrap tests aren't just for Windows
2024-07-04 15:56:43 +02:00
Niels Dossche
1006e1021e
NEWS for GH-14814
Closes GH-14814.
2024-07-04 15:56:14 +02:00
Michael Orlitzky
27dd393be9
ext/standard/tests: strings/wordwrap_memory_limit_32bit.phpt has two outputs
It turns out that on a 32-bit system, this test can produce either the
"usual" expected output from the 64-bit test, OR the 32-bit-only
integer overflow message. We copy the dual expected outputs from
chunk_split_variation1_32bit.phpt to handle both cases.

This fixes an earlier commit that split the two tests based only on
the size of an int (32-bit versus 64-bit). The CI reveals that, at
least on a debug/zts build, the "64-bit" memory limit error (and not
the integer overflow error) is still produced.
2024-07-04 15:55:05 +02:00
Michael Orlitzky
68a0efedeb
ext/standard/tests: 32bit wordwrap tests aren't just for Windows
The test in strings/wordwrap_memory_limit.phpt has a counterpart in
strings/wordwrap_memory_limit_win32.phpt. The two are conditional on
both the OS name and the size of an int (32- versus 64-bits).

A Gentoo Linux user has however reported that the 64-bit test fails on
a 32-bit system, with precisely the error message that the "win32"
test is expecting. I don't have any 32-bit hardware to test myself,
but I think it's reasonable to conclude that the OS name is not an
essential part of the test: it's simply 32- versus 64-bit.

This commit drops the conditionals for the OS name. Now one test will
be run on 32-bit systems, and the other on 64-bit systems, regardless
of the OS name.

Bug: https://bugs.gentoo.org/935382
2024-07-04 15:55:04 +02:00
Niels Dossche
279d82bb07
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14808: Unexpected null pointer in Zend/zend_string.h with empty output buffer
2024-07-04 15:50:44 +02:00
Niels Dossche
519c435fc6
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14808: Unexpected null pointer in Zend/zend_string.h with empty output buffer
2024-07-04 15:50:32 +02:00
Niels Dossche
89c3e0346a
Fix GH-14808: Unexpected null pointer in Zend/zend_string.h with empty output buffer
The output buffer can be NULL when the number of bytes is zero.

Closes GH-14815.
2024-07-04 15:49:58 +02:00
Ilija Tovilo
00cbcb4b6b
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Fix exlusion of buggy Symfony test
2024-07-04 15:45:31 +02:00
Ilija Tovilo
6361b39e81
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix exlusion of buggy Symfony test
2024-07-04 15:44:22 +02:00
Ilija Tovilo
a380cdb996
[skip ci] Fix exlusion of buggy Symfony test 2024-07-04 15:44:09 +02:00
Niels Dossche
f9844f0348
Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
  Backport libxml2 2.13.2 fixes (#14816)
2024-07-04 15:41:15 +02:00
Niels Dossche
ecf0bb0fd1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Backport libxml2 2.13.2 fixes (#14816)
2024-07-04 15:37:35 +02:00
Niels Dossche
a5a63f2904
[ci skip] NEWS 2024-07-04 15:32:05 +02:00
Niels Dossche
4fe821311c
Backport libxml2 2.13.2 fixes (#14816)
Backproted from https://github.com/php/php-src/pull/14789
2024-07-04 15:29:50 +02:00
Ilija Tovilo
c6debd788f
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix syntax error in SWITCH VM
2024-07-04 15:07:34 +02:00
Ilija Tovilo
bc32a6bd4e
Fix syntax error in SWITCH VM
Closes GH-14768
2024-07-04 15:06:49 +02:00
Peter Kokot
ad7d1a7be4
Fix GH-14792: Compilation failure on pdo_* extensions (#14797)
When building pdo_mysql, pdo_pgsql, or pdo_sqlite with phpize from
the downloaded PHP 8.4 archive, also pdo_sql_parser.h and
php_pdo_int.h need to be installed.
2024-07-04 14:58:25 +02:00
Peter Kokot
f2300376fc
Autotools: Refactor ext/standard strptime check (#14800)
- Cache variable renamed from ac_cv_strptime_decl_fails to
  php_cv_have_decl_strptime
- CS synced
2024-07-04 14:36:00 +02:00
Peter Kokot
c6ab4b31c0
Autotools: Refactor ext/standard cache variables (#14799)
- Cache variable renamed from ac_cv_flush_io to php_cv_have_flush_io
- CS synced
2024-07-04 14:34:54 +02:00
Niels Dossche
cf914f4184
Implement PHP-specific extensions to Dom (#14754)
See RFC: https://wiki.php.net/rfc/dom_additions_84
2024-07-04 13:50:19 +02:00
Niels Dossche
5b673e99fc
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix uninitialized (dummy) memory in php_strtr_array() (#14812)
2024-07-04 13:36:46 +02:00
Niels Dossche
6467655568
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix uninitialized (dummy) memory in php_strtr_array() (#14812)
2024-07-04 13:35:53 +02:00
Niels Dossche
7b74cadf8c
Fix uninitialized (dummy) memory in php_strtr_array() (#14812)
Fixes one issue in GH-14806.
2024-07-04 13:34:33 +02:00
Niels Dossche
87599717c9 Avoid pointless duplication in _end_element_handler 2024-07-04 02:21:59 -07:00