]> granicus.if.org Git - php/commitdiff
Fixed bug #60038 (SIGALRM cause segfault in php_error_cb)
authorXinchen Hui <laruence@php.net>
Sun, 16 Oct 2011 03:00:51 +0000 (03:00 +0000)
committerXinchen Hui <laruence@php.net>
Sun, 16 Oct 2011 03:00:51 +0000 (03:00 +0000)
main/main.c

index 67d2ff1b1e2d48d4fc7f33a50ec58744cd019120..cc7c0785394a28a7f98206b4b3a476d607aa8ab8 100644 (file)
@@ -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";
                }