1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 15:38:49 +02:00
Commit Graph

132453 Commits

Author SHA1 Message Date
Ilija Tovilo db2ac3a656 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix use of uninitialized memory in pcntl SIGCHLD handling
2023-06-27 11:03:48 +02:00
Ilija Tovilo 7d188491c4 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix use of uninitialized memory in pcntl SIGCHLD handling
2023-06-27 11:03:42 +02:00
Ilija Tovilo 003cf9da78 Fix use of uninitialized memory in pcntl SIGCHLD handling
psig needs to stay the tail, so that we don't get a dangling element on the end.

Closes GH-11536
2023-06-27 11:02:59 +02:00
Remi Collet 1358b435c6 more tests for zip with libzip 1.10 2023-06-27 10:52:33 +02:00
Niels Dossche 961e57eb60 Fix GH-11500: Namespace reuse in createElementNS() generates wrong output
When you construct a DOM tree containing subtrees which are constructed
top-down, this won't remove the redundant namespaces. That's because the
following conditions hold:
1) The namespace are reused from the doc->oldNs list.
2) Therefore during reconciliation no nsDef field is set, so no redundant
   namespaces are removed by our reconciliation code.

Furthermore, it would only be fixed up automatically if the tree wasn't
added in bottom-up way, or if it had been constructed bottom-up from the
start.

Fix it by setting a flag to remove redundant namespaces in the libxml2
reconciliation call.
Since removing redundant namespaces may have a performance cost, we only do
this after performing a simple check.

Closes GH-11528.
2023-06-26 19:48:40 +02:00
nielsdos c0147a0588 Fix GH-11529: Crash after dealing with an Apache request
In an MPM worker scenario we have 1 module, N threads. Each thread must
have their globals initialised. If we only initialise the filename
fields in MINIT, then the threads have an uninitialized value. If the
uninitialized value is not NULL, this leads to segfaults upon access.

Closes GH-11530.
2023-06-26 19:43:56 +02:00
Remi Collet ddb6cadb4c NEWS and UPGRADING for zip 1.22.0 2023-06-26 16:43:59 +02:00
Remi Collet b5638a1202 zip extension version 1.22.0 for libzip 1.10.0
- add new error macros (ER_DATA_LENGTH and ER_NOT_ALLOWED)
- add new archive global flags (ER_AFL_*)
- add ZipArchive::setArchiveFlag and ZipArchive::getArchiveFlag methods

New methods are available since libzip 0.11,
but really usable with new global flags
2023-06-26 16:39:22 +02:00
Vuudi dda42be9d3 [skip ci] Fixed comment for SimpleXml function getName (#11537)
Co-authored-by: David Huang <david.huang@check24.de>
2023-06-26 13:50:29 +02:00
Remi Collet 4a9fe2a214 Merge branch 'PHP-8.2'
* PHP-8.2:
  adapt test expectation with libzip 1.10
2023-06-26 09:10:56 +02:00
Remi Collet b972af9589 adapt test expectation with libzip 1.10 2023-06-26 09:10:40 +02:00
Máté Kocsis 6dd62fb3d6 Upgrade to PHP-Parser 5.0
Since it supports typed class constants. Using the alpha 3 version for now.
2023-06-25 22:54:01 +02:00
Ilija Tovilo f35e1d517f Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] XFAIL intl IntlCalendar::clear() test that may fail with ICU 73
2023-06-25 13:27:57 +02:00
Ilija Tovilo 776a685aed Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] XFAIL intl IntlCalendar::clear() test that may fail with ICU 73
2023-06-25 13:27:50 +02:00
Ilija Tovilo 8ec5a10916 [skip ci] XFAIL intl IntlCalendar::clear() test that may fail with ICU 73 2023-06-25 13:27:38 +02:00
Niels Dossche 2209f7508b Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing WUNTRACED
2023-06-25 11:18:25 +02:00
Niels Dossche a8bf8e37a9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add missing WUNTRACED
2023-06-25 11:18:15 +02:00
Niels Dossche 931d8d059b Add missing WUNTRACED
I forgot to add this in GH-11509.

Closes GH-11526.
2023-06-25 11:17:59 +02:00
Niels Dossche 0de8bc270d Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11498: SIGCHLD is not always returned from proc_open
2023-06-23 22:04:40 +02:00
Niels Dossche 022b6aa4cb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11498: SIGCHLD is not always returned from proc_open
2023-06-23 21:58:05 +02:00
nielsdos f39b513916 Fix GH-11498: SIGCHLD is not always returned from proc_open
Linux, and maybe other unixes, may merge multiple standard signals into
a single one. This causes issues when keeping track of process IDs.
Solve this by manually checking which children are dead using waitpid().

Test case is based on taka-oyama's test code.

Closes GH-11509.
2023-06-23 21:56:21 +02:00
nielsdos 14a868b7a9 Fix GH-11514: PHP 8.3 build fails with --enable-mbstring enabled
I tweaked the #if check such that the workaround only applies on GCC
versions older than 8.0.
I tested this with GCC 7.5, 8.4, 9.4, GCC 13.1.1, and Clang 10.0.

Closes GH-11516.
2023-06-23 18:24:01 +02:00
nielsdos 3c184b6de7 Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] Add forgotten NEWS entry
2023-06-23 17:50:48 +02:00
nielsdos daa891ed42 [ci skip] Add forgotten NEWS entry 2023-06-23 17:50:41 +02:00
Niels Dossche b0ba368d53 Fix GH-11408: Unable to build PHP 8.3.0 alpha 1 / fileinfo extension
On some configurations, the COMPILE_DL_FILEINFO must come from the
config.h file. If the COMPILE_DL_FILEINFO macro is not set, the build
won't include the ZEND_GET_MODULE block necessary for building this
extension as a shared object.

Closes GH-11505.
2023-06-23 17:43:52 +02:00
nielsdos d8ee89d3fa Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix interrupted CLI output causing the process to exit
2023-06-23 17:43:01 +02:00
nielsdos b9bf9ee2cb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix interrupted CLI output causing the process to exit
2023-06-23 17:42:45 +02:00
nielsdos 1111a9517b Fix interrupted CLI output causing the process to exit
When writing the output in the CLI is interrupted by a signal, the
writing will fail in sapi_cli_single_write(), causing an exit later in
sapi_cli_ub_write(). This was the other part of the issue in GH-11498.
The solution is to restart the write if an EINTR has been observed.

Closes GH-11510.
2023-06-23 17:39:04 +02:00
hanshenrik 3b0e61956e fix file() flags error-check
the old flag check was flawed and would miss some flags, for example:
file(__FILE__, FILE_APPEND);
is invalid, but the old flags error check would miss it: https://3v4l.org/b2W9u

Closes GH-11483
2023-06-23 11:06:24 +02:00
nielsdos 3c872661c1 Fix GH-11507: String concatenation performance regression in 8.3
When the code was moved to solve the uaf for memory overflow, this
caused the refcount to be higher than one in some self-concatenation
scenarios. This in turn causes quadratic time performance problems when
these concatenations happen in a loop.

Closes GH-11508.
2023-06-22 23:42:25 +02:00
Ilija Tovilo 33e2868f0d Merge branch 'PHP-8.2'
* PHP-8.2:
  Revert "Mangle PCRE regex cache key with JIT option"
2023-06-22 23:14:37 +02:00
Ilija Tovilo 7f9ad4a83a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Revert "Mangle PCRE regex cache key with JIT option"
2023-06-22 23:14:27 +02:00
Ilija Tovilo 4d91665f78 Revert "Mangle PCRE regex cache key with JIT option"
This reverts commit 466fc78d2c.
2023-06-22 23:13:37 +02:00
nielsdos 724af01eaa Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11492: Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt
2023-06-22 20:51:29 +02:00
nielsdos c44f79b7d5 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11492: Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt
2023-06-22 20:51:11 +02:00
Vinicius Dias 039dd0b4bd Fix GH-11492: Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt
Closes GH-11494.
2023-06-22 20:49:00 +02:00
Derick Rethans 783197623d Merge branch 'PHP-8.2' 2023-06-22 19:06:21 +01:00
Derick Rethans 1b5360587e Merge branch 'PHP-8.1' into PHP-8.2 2023-06-22 19:06:08 +01:00
Derick Rethans 812682591c Merge branch 'issue11368' into PHP-8.1 2023-06-22 19:05:59 +01:00
Derick Rethans 0747616f84 Fixed GH-11368: Date modify returns invalid datetime 2023-06-22 17:58:19 +01:00
Patrick Allaert 973e9b2eec Fixes "GC_BENCH" is not defined in extensions including zend_gc.h
Compilation warning encountered:

include/php/Zend/zend_gc.h:49:5: warning: "GC_BENCH" is not defined, evaluates to 0 [-Wundef]
   49 | #if GC_BENCH
      |     ^~~~~~~~
2023-06-22 17:40:15 +02:00
eater 165a4e53da github: add build scripts to "Category: Build System" label (#11474)
* github: add build scripts to "Category: Build System" label

* github: add buildconf, configure.ac and win32 build folder to build system category
2023-06-22 13:54:35 +02:00
Ilija Tovilo 2b3dbe0054 Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove session ID set through REQUEST_URI
2023-06-22 12:36:58 +02:00
Ilija Tovilo 1441f30a8d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Remove session ID set through REQUEST_URI
2023-06-22 12:36:52 +02:00
Ilija Tovilo f160eff441 Remove session ID set through REQUEST_URI 2023-06-22 12:35:55 +02:00
Ilija Tovilo 8c243c2132 [skip ci] Skip dl tests on asan
These tests fail intermittently on ASAN on GitHub actions. We cannot reproduce
this locally.
2023-06-22 11:21:11 +02:00
Ilija Tovilo 99340269c6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Mangle PCRE regex cache key with JIT option
2023-06-22 11:11:09 +02:00
Ilija Tovilo 34a1a1bddb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Mangle PCRE regex cache key with JIT option
2023-06-22 11:10:59 +02:00
Michael Voříšek 466fc78d2c Mangle PCRE regex cache key with JIT option
Closes GH-11396
2023-06-22 11:08:54 +02:00
Remi Collet 0f3e8ef0d4 Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] add CVE in NEWS
  [ci skip] add CVE in NEWS
2023-06-22 08:06:31 +02:00