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

Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix RC assertion in fpm when php_admin_value setting fails
This commit is contained in:
Ilija Tovilo
2025-09-03 14:50:15 +02:00
3 changed files with 53 additions and 0 deletions

3
NEWS
View File

@@ -14,6 +14,9 @@ PHP NEWS
. Fixed date_sunrise() and date_sunset() with partial-hour UTC offset.
(ilutov)
- FPM:
. Fixed failed debug assertion when php_admin_value setting fails. (ilutov)
- Opcache:
. Fixed bug GH-19493 (JIT variable not stored before YIELD). (Arnaud)

View File

@@ -41,6 +41,8 @@ static int fpm_php_zend_ini_alter_master(char *name, int name_length, char *new_
ini_entry->modifiable = mode;
}
} else {
/* The string wasn't installed and won't be shared, it's safe to drop. */
GC_MAKE_PERSISTENT_LOCAL(duplicate);
zend_string_release_ex(duplicate, 1);
}

View File

@@ -0,0 +1,48 @@
--TEST--
RC violation on failed php_admin_value
--SKIPIF--
<?php include "skipif.inc"; ?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR}}
pm = dynamic
pm.max_children = 5
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 3
php_admin_value[precision]=-2
EOT;
$code = <<<EOT
<?php
var_dump(ini_get('precision'));
EOT;
$ini = <<<EOT
precision=14
EOT;
$tester = new FPM\Tester($cfg, $code);
$tester->setUserIni($ini);
$tester->start();
$tester->expectLogStartNotices();
$tester->request()->expectBody(['string(2) "14"']);
$tester->terminate();
$tester->close();
?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>