mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fixed bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed)
This commit is contained in:
parent
034e8ec02e
commit
5b1bb41c0b
2
NEWS
2
NEWS
@ -3,6 +3,8 @@ PHP NEWS
|
||||
?? ??? 2016 PHP 7.0.6
|
||||
|
||||
- Core:
|
||||
. Fixed bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1'
|
||||
failed). (Laruence)
|
||||
. Fixed bug #71914 (Reference is lost in "switch"). (Laruence)
|
||||
. Fixed Bug #71859 (zend_objects_store_call_destructors operates on realloced
|
||||
memory, crashing). (Laruence)
|
||||
|
30
Zend/tests/bug71930.phpt
Normal file
30
Zend/tests/bug71930.phpt
Normal file
@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
die("skip Require a resource which is able to hold a callbck");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
public static function dummy() {
|
||||
}
|
||||
}
|
||||
|
||||
$a = array();
|
||||
$a[] = "A";
|
||||
$a[] = "dummy";
|
||||
|
||||
$ch1 = curl_init();
|
||||
curl_setopt($ch1, CURLOPT_HEADERFUNCTION, $a);
|
||||
|
||||
set_error_handler($a);
|
||||
set_error_handler(function()use($ch1){});
|
||||
set_error_handler(function(){});
|
||||
?>
|
||||
okey
|
||||
--EXPECT--
|
||||
okey
|
@ -295,8 +295,8 @@ void shutdown_executor(void) /* {{{ */
|
||||
}
|
||||
|
||||
zend_stack_clean(&EG(user_error_handlers_error_reporting), NULL, 1);
|
||||
zend_stack_clean(&EG(user_error_handlers), (void (*)(void *))ZVAL_DESTRUCTOR, 1);
|
||||
zend_stack_clean(&EG(user_exception_handlers), (void (*)(void *))ZVAL_DESTRUCTOR, 1);
|
||||
zend_stack_clean(&EG(user_error_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
|
||||
zend_stack_clean(&EG(user_exception_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
|
||||
} zend_end_try();
|
||||
|
||||
zend_try {
|
||||
|
Loading…
Reference in New Issue
Block a user