cvs: Zend / flex.skl zend.c zend_globals.h zend_language_scanner.l
| From: | Zeev Suraski | Date: | Thu, 15 Aug 2002 00:22:38 +0000 |
| Subject: | cvs: Zend / flex.skl zend.c zend_globals.h zend_language_scanner.l | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-313@lists.php.net to get a copy of this message | ||
zeev Wed Aug 14 20:22:38 2002 EDT
Modified files:
/Zend flex.skl zend.c zend_globals.h zend_language_scanner.l
Log:
Fix serious threading problems that could lead to random parse errors,
especially on multi-CPU machines
Index: Zend/flex.skl
diff -u Zend/flex.skl:1.26 Zend/flex.skl:1.27
--- Zend/flex.skl:1.26 Fri Sep 21 20:06:27 2001
+++ Zend/flex.skl Wed Aug 14 20:22:36 2002
@@ -1,7 +1,7 @@
/* A Lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /usr/repository/Zend/flex.skl,v 1.26 2001/09/22 00:06:27 zeev Exp $
+ * $Header: /usr/repository/Zend/flex.skl,v 1.27 2002/08/15 00:22:36 zeev Exp $
*/
#define FLEX_SCANNER
@@ -388,9 +388,14 @@
#endif
#if YY_STACK_USED
+#define yy_start_stack_ptr SCNG(yy_start_stack_ptr)
+#define yy_start_stack_depth SCNG(yy_start_stack_depth)
+#define yy_start_stack SCNG(yy_start_stack)
+/*
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
+*/
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state TSRMLS_DC ));
#endif
@@ -398,7 +403,7 @@
static void yy_pop_state YY_PROTO(( TSRMLS_D ));
#endif
#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
+static int yy_top_state YY_PROTO(( TSRMLS_D ));
#endif
#else
@@ -1495,7 +1500,7 @@
#ifndef YY_NO_TOP_STATE
%-
-static int yy_top_state()
+static int yy_top_state(TSRMLS_D)
%+
int yyFlexLexer::yy_top_state()
%*
Index: Zend/zend.c
diff -u Zend/zend.c:1.146 Zend/zend.c:1.147
--- Zend/zend.c:1.146 Tue Jun 18 03:29:13 2002
+++ Zend/zend.c Wed Aug 14 20:22:37 2002
@@ -369,7 +369,9 @@
scanner_globals_p->yy_out = NULL;
scanner_globals_p->_yy_more_flag = 0;
scanner_globals_p->_yy_more_len = 0;
-
+ scanner_globals_p->yy_start_stack_ptr = 0;
+ scanner_globals_p->yy_start_stack_depth = 0;
+ scanner_globals_p->yy_start_stack = 0;
}
Index: Zend/zend_globals.h
diff -u Zend/zend_globals.h:1.88 Zend/zend_globals.h:1.89
--- Zend/zend_globals.h:1.88 Sun Aug 4 02:39:44 2002
+++ Zend/zend_globals.h Wed Aug 14 20:22:37 2002
@@ -252,6 +252,9 @@
char *_yy_last_accepting_cpos;
int _yy_more_flag;
int _yy_more_len;
+ int yy_start_stack_ptr;
+ int yy_start_stack_depth;
+ int *yy_start_stack;
#ifdef ZEND_MULTIBYTE
char *code; /* original */
Index: Zend/zend_language_scanner.l
diff -u Zend/zend_language_scanner.l:1.48 Zend/zend_language_scanner.l:1.49
--- Zend/zend_language_scanner.l:1.48 Sun May 19 02:04:07 2002
+++ Zend/zend_language_scanner.l Wed Aug 14 20:22:38 2002
@@ -125,6 +125,9 @@
{
CG(heredoc) = NULL;
CG(heredoc_len)=0;
+ SCNG(yy_start_stack_ptr) = 0;
+ SCNG(yy_start_stack_depth) = 0;
+ SCNG(yy_start_stack) = 0;
}