Skip to content

Commit 1b48a5c

Browse files
committed
Fix ASAN reported leak in FPM config test
This happens because config test does not shutdown SAPI. In addition this commit also fixes few failures when running FPM tests under root. Closes GH-10296
1 parent c936c02 commit 1b48a5c

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PHP NEWS
1313
(Jakub Zelenka)
1414
. Fixed bug #68591 (Configuration test does not perform UID lookups).
1515
(Jakub Zelenka)
16+
. Fixed memory leak when running FPM config test. (Jakub Zelenka)
1617

1718
- LDAP:
1819
. Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()).

sapi/fpm/fpm/fpm_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,8 @@ consult the installation file that came with this distribution, or visit \n\
17981798
zend_quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval));
17991799
close(fpm_globals.send_config_pipe[1]);
18001800
}
1801-
return FPM_EXIT_CONFIG;
1801+
exit_status = FPM_EXIT_CONFIG;
1802+
goto out;
18021803
}
18031804

18041805
if (fpm_globals.send_config_pipe[1]) {

sapi/fpm/tests/bug68591-conf-test-group.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ $cfg = <<<EOT
1414
error_log = {{FILE:LOG}}
1515
[unconfined]
1616
listen = {{ADDR:UDS}}
17+
user = root
1718
group = aaaaaa
1819
pm = dynamic
1920
pm.max_children = 5

sapi/fpm/tests/bug68591-conf-test-listen-group.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ error_log = {{FILE:LOG}}
1515
[unconfined]
1616
listen = {{ADDR:UDS}}
1717
listen.group = aaaaaa
18+
user = root
1819
pm = dynamic
1920
pm.max_children = 5
2021
pm.start_servers = 2

sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ error_log = {{FILE:LOG}}
1515
[unconfined]
1616
listen = {{ADDR:UDS}}
1717
listen.owner = aaaaaa
18+
user = root
1819
pm = dynamic
1920
pm.max_children = 5
2021
pm.start_servers = 2

0 commit comments

Comments
 (0)