Merge branch 'master' of git.php.net:php-src

This commit is contained in:
Pierre Joye 2013-03-26 11:24:30 +01:00
commit 3b48dc0848
4 changed files with 21 additions and 7 deletions

12
Zend/tests/bug64515.phpt Normal file
View File

@ -0,0 +1,12 @@
--TEST--
Bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
--FILE--
<?php
function foo($unused = null, $unused = null, $arg = array()) {
return 1;
}
foo();
echo "okey";
?>
--EXPECT--
okey

View File

@ -41,17 +41,19 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
#define YYERROR_VERBOSE
#define YYSTYPE znode
#ifdef ZTS
# define YYPARSE_PARAM tsrm_ls
# define YYLEX_PARAM tsrm_ls
#endif
%}
%pure_parser
%expect 3
%code requires {
#ifdef ZTS
# define YYPARSE_PARAM tsrm_ls
# define YYLEX_PARAM tsrm_ls
#endif
}
%token END 0 "end of file"
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%token T_INCLUDE "include (T_INCLUDE)"

View File

@ -3266,7 +3266,7 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
zval_ptr_dtor(var_ptr);
*var_ptr = assignment_value;
CHECK_EXCEPTION();

View File

@ -1410,7 +1410,7 @@ static int ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
zval_ptr_dtor(var_ptr);
*var_ptr = assignment_value;
CHECK_EXCEPTION();