mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix RC assertion in fpm when php_admin_value setting fails
This commit is contained in:
3
NEWS
3
NEWS
@@ -15,6 +15,9 @@ PHP NEWS
|
||||
- EXIF:
|
||||
. Added support to retrieve Exif from HEIF file. (Benstone Zhang)
|
||||
|
||||
- FPM:
|
||||
. Fixed failed debug assertion when php_admin_value setting fails. (ilutov)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug GH-19486 (Incorrect opline after deoptimization). (Arnaud)
|
||||
. Fixed bug GH-19601 (Wrong JIT stack setup on aarch64/clang). (Arnaud)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
48
sapi/fpm/tests/php_admin_value-failure.phpt
Normal file
48
sapi/fpm/tests/php_admin_value-failure.phpt
Normal 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();
|
||||
?>
|
||||
Reference in New Issue
Block a user