Skip to content

Commit

Permalink
Fix ASAN reported leak in FPM config test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bukka committed Jan 12, 2023
1 parent c936c02 commit 1b48a5c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -13,6 +13,7 @@ PHP NEWS
(Jakub Zelenka)
. Fixed bug #68591 (Configuration test does not perform UID lookups).
(Jakub Zelenka)
. Fixed memory leak when running FPM config test. (Jakub Zelenka)

- LDAP:
. Fixed bug GH-10112 (LDAP\Connection::__construct() refers to ldap_create()).
Expand Down
3 changes: 2 additions & 1 deletion sapi/fpm/fpm/fpm_main.c
Expand Up @@ -1798,7 +1798,8 @@ consult the installation file that came with this distribution, or visit \n\
zend_quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval));
close(fpm_globals.send_config_pipe[1]);
}
return FPM_EXIT_CONFIG;
exit_status = FPM_EXIT_CONFIG;
goto out;
}

if (fpm_globals.send_config_pipe[1]) {
Expand Down
1 change: 1 addition & 0 deletions sapi/fpm/tests/bug68591-conf-test-group.phpt
Expand Up @@ -14,6 +14,7 @@ $cfg = <<<EOT
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR:UDS}}
user = root
group = aaaaaa
pm = dynamic
pm.max_children = 5
Expand Down
1 change: 1 addition & 0 deletions sapi/fpm/tests/bug68591-conf-test-listen-group.phpt
Expand Up @@ -15,6 +15,7 @@ error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR:UDS}}
listen.group = aaaaaa
user = root
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
Expand Down
1 change: 1 addition & 0 deletions sapi/fpm/tests/bug68591-conf-test-listen-owner.phpt
Expand Up @@ -15,6 +15,7 @@ error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR:UDS}}
listen.owner = aaaaaa
user = root
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
Expand Down

0 comments on commit 1b48a5c

Please sign in to comment.