Permalink
Browse files

fix bug #64660 - yyparse can return 2, not only 1

  • Loading branch information...
1 parent 7c66c50 commit fb58e69a84f4fde603a630d2c9df2fa3be16d846 @smalyshev smalyshev committed May 20, 2013
Showing with 20 additions and 7 deletions.
  1. +4 −2 NEWS
  2. +11 −0 Zend/tests/bug64660.phpt
  3. +3 −3 Zend/zend_language_scanner.c
  4. +2 −2 Zend/zend_language_scanner.l
View
6 NEWS
@@ -4,6 +4,8 @@ PHP NEWS
- Core:
. Fixed bug #64729 (compilation failure on x32). (Gustavo)
+ . Fixed bug #64660 (Segfault on memory exhaustion within function definition).
+ (Stas)
. Fixed bug #64853 (Use of no longer available ini directives causes crash on
TS build). (Anatol)
@@ -18,12 +20,12 @@ PHP NEWS
- SNMP:
. Fixed bug #64765 (Some IPv6 addresses get interpreted wrong).
- (Boris Lytochkin)
+ (Boris Lytochkin)
. Fixed bug #64159 (Truncated snmpget). (Boris Lytochkin)
- Zend Engine:
. Fixed bug #64821 (Custom Exceptions crash when internal properties overridden).
- (Anatol)
+ (Anatol)
09 May 2013, PHP 5.4.15
- Core:
View
Oops, something went wrong.
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Mar 27 23:52:29 2013 */
+/* Generated by re2c 0.13.5 on Mon May 20 00:45:38 2013 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -585,7 +585,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
- if (compiler_result==1) { /* parser error */
+ if (compiler_result != 0) { /* parser error */
zend_bailout();
}
compilation_successful=1;
@@ -760,7 +760,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
SCNG(script_filtered) = NULL;
}
- if (compiler_result==1) {
+ if (compiler_result != 0) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
destroy_op_array(op_array TSRMLS_CC);
@@ -583,7 +583,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
- if (compiler_result==1) { /* parser error */
+ if (compiler_result != 0) { /* parser error */
zend_bailout();
}
compilation_successful=1;
@@ -758,7 +758,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
SCNG(script_filtered) = NULL;
}
- if (compiler_result==1) {
+ if (compiler_result != 0) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
destroy_op_array(op_array TSRMLS_CC);

0 comments on commit fb58e69

Please sign in to comment.