Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
name: LINUX_PPC64_ASAN_DEBUG_ZTS
# This runs on a self-hosted runner; see https://wiki.php.net/systems/ci
runs-on: [self-hosted, gentoo, ppc64]
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
if: ${{ fromJson(inputs.branch).jobs.ALPINE }}
name: ALPINE_X64_ASAN_DEBUG_ZTS
runs-on: ubuntu-24.04
timeout-minutes: 180
container:
image: 'alpine:3.22'
steps:
Expand Down Expand Up @@ -130,6 +132,7 @@ jobs:
matrix: ${{ fromJson(inputs.branch).jobs.LINUX_X64.matrix }}
name: "LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -228,6 +231,7 @@ jobs:
matrix: ${{ fromJson(inputs.branch).jobs.LINUX_X32.matrix }}
name: "LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
runs-on: ubuntu-latest
timeout-minutes: 180
container:
image: ubuntu:${{ fromJson(inputs.branch).config.ubuntu_version }}
env:
Expand Down Expand Up @@ -309,6 +313,7 @@ jobs:
matrix: ${{ fromJson(inputs.branch).jobs.MACOS.matrix }}
name: "MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
runs-on: macos-${{ matrix.arch == 'X64' && '15-intel' || fromJson(inputs.branch).jobs.MACOS.config.arm64_version }}
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -386,6 +391,7 @@ jobs:
FIREBIRD_USER: test
FIREBIRD_PASSWORD: test
runs-on: ubuntu-24.04
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -567,6 +573,10 @@ jobs:
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
# Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("public function testCastNonTrailingCharPointer()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
# Causes massive amounts of system calls with USE_ZEND_ALLOC=0, exceeding the timeout
if [ -e 'src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php' ]; then
php -r '$c = file_get_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php"); $c = str_replace("public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", $c); file_put_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php", $c);'
fi
export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
X=0
for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
Expand Down Expand Up @@ -642,6 +652,7 @@ jobs:
FIREBIRD_PASSWORD: test
name: OPCACHE_VARIATION
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -705,6 +716,7 @@ jobs:
if: ${{ fromJson(inputs.branch).jobs.MSAN }}
name: MSAN
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -796,6 +808,7 @@ jobs:
if: ${{ fromJson(inputs.branch).jobs.LIBMYSQLCLIENT }}
name: LIBMYSQLCLIENT
runs-on: ubuntu-${{ fromJson(inputs.branch).config.ubuntu_version }}
timeout-minutes: 180
steps:
- name: git checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -834,6 +847,7 @@ jobs:
matrix: ${{ fromJson(inputs.branch).jobs.WINDOWS.matrix }}
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}${{ matrix.clang && '_CLANG' || ''}}"
runs-on: ${{ fromJson(inputs.branch).jobs.WINDOWS.config.runs_on }}
timeout-minutes: 180
env:
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
PHP_BUILD_OBJ_DIR: C:\obj
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ PHP NEWS
surrounding property access). (timwolla)
. Fixed GH-22422 (zend_arena layout mismatch leaked memory in separately
built extensions under AddressSanitizer). (iliaal)
. TSRM: use local-exec TLS in PIE executables. (henderkes)

- BCMath:
. Added NUL-byte validation to BCMath functions. (jorgsowa)
Expand Down
2 changes: 1 addition & 1 deletion TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ TSRM_API bool tsrm_is_managed_thread(void);
#if !__has_attribute(tls_model) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__MUSL__) || defined(__HAIKU__)
# define TSRM_TLS_MODEL_ATTR
# define TSRM_TLS_MODEL_DEFAULT
#elif __PIC__
#elif defined(__PIC__) && !defined(__PIE__)
# define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("initial-exec")))
# define TSRM_TLS_MODEL_INITIAL_EXEC
#else
Expand Down
1 change: 1 addition & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ PHP 8.6 UPGRADE NOTES
. The performance of the TAILCALL VM has been improved.
. The TAILCALL VM is now enabled on Windows when compiling with Clang >= 19
x86_64.
. The performance of ZTS+PIE builds has been improved.

- DOM:
. Made splitText() faster and consume less memory.
Expand Down
2 changes: 1 addition & 1 deletion ext/bz2/bz2.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ PHP_FUNCTION(bzdecompress)
/* no reason to continue if we're going to drop it anyway */
break;
}
dest = zend_string_safe_realloc(dest, 1, bzs.avail_out+1, (size_t) size, 0);
dest = zend_string_safe_realloc(dest, 1, (size_t) bzs.avail_out + 1, (size_t) size, 0);
bzs.next_out = ZSTR_VAL(dest) + size;
}

Expand Down
4 changes: 2 additions & 2 deletions ext/openssl/openssl_pwhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ PHP_FUNCTION(openssl_password_hash)
Z_PARAM_ARRAY_HT(options)
ZEND_PARSE_PARAMETERS_END();

if (strcmp(ZSTR_VAL(algo), "argon2i") && strcmp(ZSTR_VAL(algo), "argon2id")) {
if (!zend_string_equals_literal(algo, "argon2i") && !zend_string_equals_literal(algo, "argon2id")) {
zend_argument_value_error(1, "must be a valid password openssl hashing algorithm");
RETURN_THROWS();
}
Expand All @@ -355,7 +355,7 @@ PHP_FUNCTION(openssl_password_verify)
Z_PARAM_STR(digest)
ZEND_PARSE_PARAMETERS_END();

if (strcmp(ZSTR_VAL(algo), "argon2i") && strcmp(ZSTR_VAL(algo), "argon2id")) {
if (!zend_string_equals_literal(algo, "argon2i") && !zend_string_equals_literal(algo, "argon2id")) {
zend_argument_value_error(1, "must be a valid password openssl hashing algorithm");
RETURN_THROWS();
}
Expand Down
3 changes: 2 additions & 1 deletion ext/soap/php_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,12 @@ static encodePtr find_encoder_by_type_name(sdlPtr sdl, const char *type)
{
if (sdl && sdl->encoders) {
encodePtr enc;
size_t type_len = strlen(type);

ZEND_HASH_FOREACH_PTR(sdl->encoders, enc) {
if (type[0] == '{') {
if (enc->details.clark_notation
&& strcmp(ZSTR_VAL(enc->details.clark_notation), type) == 0) {
&& zend_string_equals_cstr(enc->details.clark_notation, type, type_len)) {
return enc;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion ext/soap/php_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static bool in_domain(const zend_string *host, const zend_string *domain)
{
if (ZSTR_VAL(domain)[0] == '.') {
if (ZSTR_LEN(host) > ZSTR_LEN(domain)) {
return strcmp(ZSTR_VAL(host)+ZSTR_LEN(host)-ZSTR_LEN(domain), ZSTR_VAL(domain)) == 0;
return zend_string_equals_cstr(domain, ZSTR_VAL(host) + ZSTR_LEN(host) - ZSTR_LEN(domain), ZSTR_LEN(domain));
} else {
return false;
}
Expand Down