From 1f78177e2b148ca502b65a8f22c341260aac627b Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 16 Oct 2011 03:00:51 +0000 Subject: [PATCH] Fixed bug #60038 (SIGALRM cause segfault in php_error_cb) --- NEWS | 1 + main/main.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 032a40f977..6fe03ac40f 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ PHP NEWS . Fixed bug #55622 (memory corruption in parse_ini_string). (Pierre) . Fixed bug #55825 (Missing initial value of static locals in trait methods). (Laruence) + . Fixed bug #60038 (SIGALRM cause segfault in php_error_cb). (Laruence) - Openssl - Revert r313616 (When we have a blocking SSL socket, respect the timeout diff --git a/main/main.c b/main/main.c index 67d2ff1b1e..cc7c078539 100644 --- a/main/main.c +++ b/main/main.c @@ -900,6 +900,9 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ /* store the error if it has changed */ if (display) { +#ifdef ZEND_SIGNALS + HANDLE_BLOCK_INTERRUPTIONS(); +#endif if (PG(last_error_message)) { free(PG(last_error_message)); PG(last_error_message) = NULL; @@ -908,6 +911,9 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ free(PG(last_error_file)); PG(last_error_file) = NULL; } +#ifdef ZEND_SIGNALS + HANDLE_UNBLOCK_INTERRUPTIONS(); +#endif if (!error_filename) { error_filename = "Unknown"; } -- 2.50.1