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

Fix GH-18595: fpm_get_status segfault

This fixes null dereference error when calling fpm_get_status() and one
of the children is just being created.

Closes GH-18662

Co-authored-by: Jakub Zelenka <bukka@php.net>
This commit is contained in:
txuna
2025-05-26 13:25:21 +00:00
committed by Jakub Zelenka
parent 087f38f347
commit 48b492269b
3 changed files with 6 additions and 1 deletions

3
NEWS
View File

@@ -9,6 +9,9 @@ PHP NEWS
- Date:
. Fix leaks with multiple calls to DatePeriod iterator current(). (nielsdos)
- FPM:
. Fixed GH-18662 (fpm_get_status segfault). (txuna)
- Intl:
. Fix memory leak in intl_datetime_decompose() on failure. (nielsdos)

View File

@@ -22,6 +22,7 @@
#include "zlog.h"
static const char *requests_stages[] = {
[FPM_REQUEST_CREATING] = "Creating",
[FPM_REQUEST_ACCEPTING] = "Idle",
[FPM_REQUEST_READING_HEADERS] = "Reading headers",
[FPM_REQUEST_INFO] = "Getting request information",

View File

@@ -25,7 +25,8 @@ const char *fpm_request_get_stage_name(int stage);
int fpm_request_last_activity(struct fpm_child_s *child, struct timeval *tv);
enum fpm_request_stage_e {
FPM_REQUEST_ACCEPTING = 1,
FPM_REQUEST_CREATING,
FPM_REQUEST_ACCEPTING,
FPM_REQUEST_READING_HEADERS,
FPM_REQUEST_INFO,
FPM_REQUEST_EXECUTING,