From: Michael Wallner Date: Tue, 30 May 2006 17:40:52 +0000 (+0000) Subject: - fix bug #37635 (parameter of pcntl signal handler is trashed) X-Git-Tag: php-5.2.0RC1~416 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=258351c30a68ca9d9a3b849189b33e576f757700;p=php - fix bug #37635 (parameter of pcntl signal handler is trashed) --- diff --git a/NEWS b/NEWS index 0588b8358e..55c5629b70 100644 --- a/NEWS +++ b/NEWS @@ -49,10 +49,11 @@ PHP NEWS - Added RFC2397 (data: stream) support. (Marcus) - Fixed memory leaks in openssl streams context options (Pierre) - Fixed handling of extremely long paths inside tempnam() function. (Ilia) +- Fixed bug #37635 (parameter of pcntl signal handler is trashed). (Mike) - Fixed bug #37632 (Protected method access problem). (Marcus) -- Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Hannes - Magnusson, Derick) - Fixed bug #37620 (mysqli_ssl_set validation is innappropriate). (Georg) +- Fixed bug #37616 (DATE_RFC822 does not product RFC 822 dates). + (Hannes Magnusson, Derick) - Fixed bug #37614 (Class name lowercased in error message). (Johannes) - Fixed bug #37587 (var without attribute causes segfault). (Marcus) - Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 7705a287e0..8f18088948 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -693,16 +693,19 @@ void pcntl_tick_handler() PCNTL_G(head) = NULL; /* simple stores are atomic */ /* Allocate */ - MAKE_STD_ZVAL(param); - MAKE_STD_ZVAL(retval); while (queue) { if (zend_hash_index_find(&PCNTL_G(php_signal_table), queue->signo, (void **) &handle)==SUCCESS) { + MAKE_STD_ZVAL(retval); + MAKE_STD_ZVAL(param); + ZVAL_NULL(retval); ZVAL_LONG(param, queue->signo); /* Call php signal handler - Note that we do not report errors, and we ignore the return value */ /* FIXME: this is probably broken when multiple signals are handled in this while loop (retval) */ call_user_function(EG(function_table), NULL, *handle, retval, 1, ¶m TSRMLS_CC); + zval_ptr_dtor(¶m); + zval_ptr_dtor(&retval); } next = queue->next; @@ -713,10 +716,6 @@ void pcntl_tick_handler() /* Re-enable queue */ PCNTL_G(processing_signal_queue) = 0; - - /* Clean up */ - efree(param); - efree(retval); }