mirror of
https://github.com/php/php-src.git
synced 2026-04-20 14:31:06 +02:00
Fixed bug #64515 (Memoryleak when using the same variablename 2times in function declaration)
This commit is contained in:
2
NEWS
2
NEWS
@@ -2,6 +2,8 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2013, PHP 5.4.14
|
||||
- Core
|
||||
. Fixed bug #64515 (Memoryleak when using the same variablename 2times in
|
||||
function declaration). (Laruence)
|
||||
. Fixed bug #64432 (more empty delimiter warning in strX methods). (Laruence)
|
||||
. Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error).
|
||||
(Dmitry)
|
||||
|
||||
10
Zend/tests/bug64515.phpt
Normal file
10
Zend/tests/bug64515.phpt
Normal file
@@ -0,0 +1,10 @@
|
||||
--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();
|
||||
?>
|
||||
--EXPECT--
|
||||
@@ -3234,7 +3234,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(EX_CVs(), opline->result.var TSRMLS_CC);
|
||||
Z_DELREF_PP(var_ptr);
|
||||
zval_ptr_dtor(var_ptr);
|
||||
*var_ptr = assignment_value;
|
||||
|
||||
CHECK_EXCEPTION();
|
||||
|
||||
@@ -1374,7 +1374,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(EX_CVs(), opline->result.var TSRMLS_CC);
|
||||
Z_DELREF_PP(var_ptr);
|
||||
zval_ptr_dtor(var_ptr);
|
||||
*var_ptr = assignment_value;
|
||||
|
||||
CHECK_EXCEPTION();
|
||||
|
||||
Reference in New Issue
Block a user