Browse Source
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug
pull/2357/head
Joe Watkins
10 years ago
No known key found for this signature in database
GPG Key ID: F9BA0ADA31CBD89E
4 changed files with
14 additions and
12 deletions
-
NEWS
-
Zend/zend_builtin_functions.c
-
Zend/zend_execute_API.c
-
ext/standard/tests/general_functions/bug73973.phpt
|
|
|
@ -10,6 +10,7 @@ PHP NEWS |
|
|
|
. Fixed bug #73962 (bug with symlink related to cyrillic directory). (Anatol) |
|
|
|
. Fixed bug #73969 (segfault in debug_print_backtrace). (andrewnester) |
|
|
|
. Fixed bug #73994 (arginfo incorrect for unpack). (krakjoe) |
|
|
|
. Fixed bug #73973 (assertion error in debug_zval_dump). (andrewnester) |
|
|
|
|
|
|
|
- DOM: |
|
|
|
. Fixed bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes). |
|
|
|
|
|
|
|
@ -879,9 +879,6 @@ static void copy_constant_array(zval *dst, zval *src) /* {{{ */ |
|
|
|
} |
|
|
|
} else if (Z_REFCOUNTED_P(val)) { |
|
|
|
Z_ADDREF_P(val); |
|
|
|
if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_RESOURCE_EX)) { |
|
|
|
Z_TYPE_INFO_P(new_val) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT); |
|
|
|
} |
|
|
|
} |
|
|
|
} ZEND_HASH_FOREACH_END(); |
|
|
|
} |
|
|
|
@ -924,12 +921,7 @@ repeat: |
|
|
|
case IS_FALSE: |
|
|
|
case IS_TRUE: |
|
|
|
case IS_NULL: |
|
|
|
break; |
|
|
|
case IS_RESOURCE: |
|
|
|
ZVAL_COPY(&val_free, val); |
|
|
|
/* TODO: better solution than this tricky disable dtor on resource? */ |
|
|
|
Z_TYPE_INFO(val_free) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT); |
|
|
|
val = &val_free; |
|
|
|
break; |
|
|
|
case IS_ARRAY: |
|
|
|
if (!Z_IMMUTABLE_P(val)) { |
|
|
|
|
|
|
|
@ -345,6 +345,10 @@ void shutdown_executor(void) /* {{{ */ |
|
|
|
zend_llist_destroy(&CG(open_files)); |
|
|
|
} zend_end_try(); |
|
|
|
|
|
|
|
zend_try { |
|
|
|
clean_non_persistent_constants(); |
|
|
|
} zend_end_try(); |
|
|
|
|
|
|
|
zend_try { |
|
|
|
zend_close_rsrc_list(&EG(regular_list)); |
|
|
|
} zend_end_try(); |
|
|
|
@ -376,10 +380,6 @@ void shutdown_executor(void) /* {{{ */ |
|
|
|
} |
|
|
|
} zend_end_try(); |
|
|
|
|
|
|
|
zend_try { |
|
|
|
clean_non_persistent_constants(); |
|
|
|
} zend_end_try(); |
|
|
|
|
|
|
|
zend_try { |
|
|
|
#if 0&&ZEND_DEBUG |
|
|
|
signal(SIGSEGV, original_sigsegv_handler); |
|
|
|
|
|
|
|
@ -0,0 +1,9 @@ |
|
|
|
--TEST-- |
|
|
|
Bug #73973 debug_zval_dump() assertion error for resource consts with --enable-debug |
|
|
|
--FILE-- |
|
|
|
<?php |
|
|
|
define('myerr', fopen('php://stderr', 'w')); |
|
|
|
debug_zval_dump(myerr); |
|
|
|
?> |
|
|
|
--EXPECTF-- |
|
|
|
resource(5) of type (stream) refcount(%d) |