From 6563ae2a6f2c50be216f9a9e736f1b89028ab8c9 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Thu, 23 Apr 2026 21:25:47 +0100 Subject: [PATCH 1/2] ext/phar: pass NULL pointer for error instead of freeing it immediately This is effectively doing unnecessary allocations for no good reason. --- ext/phar/stream.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 2a0bdf7e1acc..1d9229c44621 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -742,11 +742,8 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from php_error_docref(NULL, E_WARNING, "phar error: cannot rename \"%s\" to \"%s\": invalid or non-writable url \"%s\"", url_from, url_to, url_from); return 0; } - if (SUCCESS != phar_get_archive(&pfrom, ZSTR_VAL(resource_from->host), ZSTR_LEN(resource_from->host), NULL, 0, &error)) { + if (SUCCESS != phar_get_archive(&pfrom, ZSTR_VAL(resource_from->host), ZSTR_LEN(resource_from->host), NULL, 0, NULL)) { pfrom = NULL; - if (error) { - efree(error); - } } if (PHAR_G(readonly) && (!pfrom || !pfrom->is_data)) { php_url_free(resource_from); @@ -760,10 +757,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from php_error_docref(NULL, E_WARNING, "phar error: cannot rename \"%s\" to \"%s\": invalid or non-writable url \"%s\"", url_from, url_to, url_to); return 0; } - if (SUCCESS != phar_get_archive(&pto, ZSTR_VAL(resource_to->host), ZSTR_LEN(resource_to->host), NULL, 0, &error)) { - if (error) { - efree(error); - } + if (SUCCESS != phar_get_archive(&pto, ZSTR_VAL(resource_to->host), ZSTR_LEN(resource_to->host), NULL, 0, NULL)) { pto = NULL; } if (PHAR_G(readonly) && (!pto || !pto->is_data)) { From 046ffa257581d6f1a709e9fbc4638793c2ac7e22 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 24 Apr 2026 01:09:36 +0200 Subject: [PATCH 2/2] [skip ci] Restrict Windows+Clang build to PHP 8.6 --- .github/matrix.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/matrix.php b/.github/matrix.php index 18c2ef1269b7..eb10492d17f5 100644 --- a/.github/matrix.php +++ b/.github/matrix.php @@ -148,7 +148,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re if ($all_variations) { $matrix[] = ['asan' => true, 'opcache' => true, 'x64' => true, 'zts' => true]; $matrix[] = ['asan' => false, 'opcache' => false, 'x64' => false, 'zts' => false]; - if (version_compare($php_version, '8.5', '>=')) { + if (version_compare($php_version, '8.6', '>=')) { $matrix[] = ['asan' => false, 'opcache' => true, 'x64' => true, 'zts' => true, 'clang' => true]; } }