Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix bug #64660 - yyparse can return 2, not only 1
  • Loading branch information
smalyshev committed May 20, 2013
1 parent 7c66c50 commit fb58e69
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
6 changes: 4 additions & 2 deletions NEWS
Expand Up @@ -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)

Expand All @@ -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:
Expand Down
11 changes: 11 additions & 0 deletions Zend/tests/bug64660.phpt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Zend/zend_language_scanner.c
@@ -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"
/*
+----------------------------------------------------------------------+
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_language_scanner.l
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fb58e69

Please sign in to comment.