cvs: ZendEngine2(PHP_5_3) / zend.c zend.h zend_globals.h

[email protected] ("Rasmus Lerdorf")
Newsgroups php.zend-engine.cvs
Message-ID <cvsrasmus1205865251@cvsserver>
rasmus		Tue Mar 18 18:34:11 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend.c zend.h zend_globals.h 
  Log:
  Use sigsetjmp and siglongjmp instead of setjmp/longjmp in order to be
  consistent in how we deal with the signal mask.  POSIX doesn't specify
  what to do with the signal mask in setjmp/longjmp which has resulted in
  the signal mask getting saved on *BSD and not getting saved on Linux.
  Making the behaviour explicit via sigsetjmp/siglongjmp gives us
  consistency and saves expensive sigprocmask() syscalls on *BSD.
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.13&r2=1.308.2.12.2.35.2.14&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.13 ZendEngine2/zend.c:1.308.2.12.2.35.2.14
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.13	Tue Mar 18 14:10:43 2008
+++ ZendEngine2/zend.c	Tue Mar 18 18:34:11 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.13 2008/03/18 14:10:43 felipe Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.14 2008/03/18 18:34:11 rasmus Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -794,7 +794,7 @@
 	CG(unclean_shutdown) = 1;
 	CG(in_compilation) = EG(in_execution) = 0;
 	EG(current_execute_data) = NULL;
-	longjmp(*EG(bailout), FAILURE);
+	siglongjmp(*EG(bailout), FAILURE);
 }
 /* }}} */
 END_EXTERN_C()
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.293.2.11.2.9.2.18&r2=1.293.2.11.2.9.2.19&diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293.2.11.2.9.2.18 ZendEngine2/zend.h:1.293.2.11.2.9.2.19
--- ZendEngine2/zend.h:1.293.2.11.2.9.2.18	Sat Mar  8 21:54:03 2008
+++ ZendEngine2/zend.h	Tue Mar 18 18:34:11 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.h,v 1.293.2.11.2.9.2.18 2008/03/08 21:54:03 felipe Exp $ */
+/* $Id: zend.h,v 1.293.2.11.2.9.2.19 2008/03/18 18:34:11 rasmus Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -522,11 +522,11 @@
 
 #define zend_try												\
 	{															\
-		jmp_buf *__orig_bailout = EG(bailout);					\
-		jmp_buf __bailout;										\
+		sigjmp_buf *__orig_bailout = EG(bailout);					\
+		sigjmp_buf __bailout;										\
 																\
 		EG(bailout) = &__bailout;								\
-		if (setjmp(__bailout)==0) {
+		if (sigsetjmp(__bailout, 0)==0) {
 #define zend_catch												\
 		} else {												\
 			EG(bailout) = __orig_bailout;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_globals.h?r1=1.141.2.3.2.7.2.11&r2=1.141.2.3.2.7.2.12&diff_format=u
Index: ZendEngine2/zend_globals.h
diff -u ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.11 ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.12
--- ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.11	Tue Mar 18 14:10:43 2008
+++ ZendEngine2/zend_globals.h	Tue Mar 18 18:34:11 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.11 2008/03/18 14:10:43 felipe Exp $ */
+/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.12 2008/03/18 18:34:11 rasmus Exp $ */
 
 #ifndef ZEND_GLOBALS_H
 #define ZEND_GLOBALS_H
@@ -161,7 +161,7 @@
 
 	HashTable included_files;	/* files already included */
 
-	jmp_buf *bailout;
+	sigjmp_buf *bailout;
 
 	int error_reporting;
 	int orig_error_reporting;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.