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

136743 Commits

Author SHA1 Message Date
David Carlier
c14fa48526 Merge branch 'PHP-8.3' 2024-07-06 20:44:47 +01:00
David Carlier
0b28914a26 Merge branch 'PHP-8.2' into PHP-8.3 2024-07-06 20:44:20 +01:00
David Carlier
237518763f Fix GH-14774 time_sleep_until overflow. 2024-07-06 20:43:59 +01:00
Niels Dossche
b41e90c6f9 Fix bug #81481 (xml_get_current_byte_index limited to 32-bit numbers on 64-bit builds) (#14845)
The return value is long in both expat and expat2 (with XML_LARGE_SIZE
not set).
2024-07-06 18:34:17 +02:00
Arnaud Le Blanc
ec19abf161 [ci skip] NEWS for GH-14801 2024-07-06 17:59:55 +02:00
Niels Dossche
f0441e05b8 Add LIBXML_NO_XXE constant (#14844)
This constant is available as of libxml2 2.13, and is used together with
LIBXML_NOENT to allow entity subsitution but disallow external entities.
2024-07-06 17:43:46 +02:00
Andy Postnikov
1f64e7c253 Fix build for armv7 (#14801) 2024-07-06 15:21:45 +02:00
Niels Dossche
b418d19c42 [ci skip] Make test more robust 2024-07-06 14:46:07 +02:00
Niels Dossche
fff206ba1e Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] Test is for libxml only
2024-07-06 14:42:05 +02:00
Niels Dossche
459d79db95 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Test is for libxml only
2024-07-06 14:41:56 +02:00
Niels Dossche
0b6289dab8 [ci skip] Test is for libxml only 2024-07-06 14:41:44 +02:00
Niels Dossche
f98aa06c68 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14834: Error installing PHP when --with-pear is used
2024-07-06 13:52:42 +02:00
Niels Dossche
9a337a85bf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14834: Error installing PHP when --with-pear is used
2024-07-06 13:52:34 +02:00
Niels Dossche
67259e451d Fix GH-14834: Error installing PHP when --with-pear is used
libxml2 2.13 makes changes to how the parsing state is set, update our
code accordingly. In particular, it started reporting entities within
attributes, while it should only report entities inside text nodes.

Closes GH-14837.
2024-07-06 13:52:02 +02:00
Niels Dossche
b4384488bc Merge branch 'PHP-8.3'
* PHP-8.3:
  NEWS for compatibility in XML
  Stop setting parse options directly
  Stop relying on lastError directly
  Stop relying on the sax2 flag directly
  Port XML_GetCurrentByteIndex to public APIs
2024-07-06 13:50:32 +02:00
Niels Dossche
a1bcaf05b0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  NEWS for compatibility in XML
  Stop setting parse options directly
  Stop relying on lastError directly
  Stop relying on the sax2 flag directly
  Port XML_GetCurrentByteIndex to public APIs
2024-07-06 13:50:23 +02:00
Niels Dossche
a66afbbe09 NEWS for compatibility in XML
Closes GH-14836.
2024-07-06 13:49:12 +02:00
Niels Dossche
e5e15fd229 Stop setting parse options directly
Setting this directly will be deprecated in libxml2 2.14.
2024-07-06 13:46:16 +02:00
Niels Dossche
823d0588f7 Stop relying on lastError directly
Reading this directly will become deprecated in libxml2 2.14.
2024-07-06 13:46:15 +02:00
Niels Dossche
6490a18271 Stop relying on the sax2 flag directly
Setting this directly will become deprecated in libxml2 2.14.
2024-07-06 13:46:15 +02:00
Niels Dossche
8dc799aac7 Port XML_GetCurrentByteIndex to public APIs
This is necessary to avoid a deprecation break in libxml2 2.14.x.
2024-07-06 13:46:15 +02:00
Niels Dossche
8c8322f6a1 ext/xml: Use zend_hash_find_ptr_lc() to avoid allocation in some cases (#14840) 2024-07-06 13:44:10 +02:00
Peter Kokot
17ef4b7ced Autotools: Sync CS in phpize and configure.ac (#14838)
- This syncs Autoconf syntax with AS_VAR_* macros in phpize and
  configure.ac
- The cross-compiling check synced with configure.ac (the check message
  printed after program check message)
- Some redundant quoting removed
2024-07-06 13:35:14 +02:00
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