mirror of
https://github.com/php/php-src.git
synced 2024-10-02 23:36:16 +00:00
Merge branch 'master' of git.php.net:php-src
This commit is contained in:
commit
3b48dc0848
12
Zend/tests/bug64515.phpt
Normal file
12
Zend/tests/bug64515.phpt
Normal 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
|
@ -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)"
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user