Skip to content

Commit

Permalink
Fixed bug #60627 (httpd.worker segfault on startup with php_value)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Jan 4, 2012
1 parent dd943bc commit 1c4f227
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -5,6 +5,8 @@ PHP NEWS
. Fixed bug #60613 (Segmentation fault with $cls->{expr}() syntax). (Dmitry)
. Fixed bug #60611 (Segmentation fault with Cls::{expr}() syntax). (Laruence)
. Fixed bug #55871 (Interruption in substr_replace()). (Stas)
. Fixed bug #60627 (httpd.worker segfault on startup with php_value).
(Laruence)

- SAPI:
. Fixed bug #55500 (Corrupted $_FILES indices lead to security concern).
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend.h
Expand Up @@ -709,8 +709,8 @@ END_EXTERN_C()
#else
#include "zend_signal.h"

#define HANDLE_BLOCK_INTERRUPTIONS() SIGG(depth)++;
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (UNEXPECTED((--SIGG(depth))==SIGG(blocked))) { zend_signal_handler_unblock(TSRMLS_C); }
#define HANDLE_BLOCK_INTERRUPTIONS() ZEND_SIGNAL_BLOCK_INTERRUPUTIONS()
#define HANDLE_UNBLOCK_INTERRUPTIONS() ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS()
#endif

BEGIN_EXTERN_C()
Expand Down
4 changes: 4 additions & 0 deletions Zend/zend_signal.h
Expand Up @@ -69,9 +69,13 @@ typedef struct _zend_signal_globals_t {
BEGIN_EXTERN_C()
ZEND_API extern int zend_signal_globals_id;
END_EXTERN_C()
# define ZEND_SIGNAL_BLOCK_INTERRUPUTIONS() if (EXPECTED(zend_signal_globals_id)) { SIGG(depth)++; }
# define ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS() if (EXPECTED(zend_signal_globals_id) && UNEXPECTED((--SIGG(depth))==SIGG(blocked))) { zend_signal_handler_unblock(TSRMLS_C); }
#else /* ZTS */
# define SIGG(v) (zend_signal_globals.v)
extern ZEND_API zend_signal_globals_t zend_signal_globals;
# define ZEND_SIGNAL_BLOCK_INTERRUPUTIONS() SIGG(depth)++;
# define ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS() if (UNEXPECTED((--SIGG(depth))==SIGG(blocked))) { zend_signal_handler_unblock(TSRMLS_C); }
#endif /* not ZTS */

# define SIGNAL_BEGIN_CRITICAL() sigset_t oldmask; \
Expand Down

0 comments on commit 1c4f227

Please sign in to comment.