mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-15901: phpdbg: Assertion failure on `i funcs`
This commit is contained in:
commit
c76913fde0
3 changed files with 44 additions and 27 deletions
3
NEWS
3
NEWS
|
@ -2,6 +2,9 @@ PHP NEWS
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
?? ??? ????, PHP 8.3.13
|
?? ??? ????, PHP 8.3.13
|
||||||
|
|
||||||
|
- PHPDBG:
|
||||||
|
. Fixed bug GH-15901 (phpdbg: Assertion failure on i funcs). (cmb)
|
||||||
|
|
||||||
- SimpleXML:
|
- SimpleXML:
|
||||||
. Fixed bug GH-15837 (Segmentation fault in ext/simplexml/simplexml.c).
|
. Fixed bug GH-15837 (Segmentation fault in ext/simplexml/simplexml.c).
|
||||||
(nielsdos)
|
(nielsdos)
|
||||||
|
|
|
@ -399,27 +399,29 @@ PHPDBG_INFO(classes) /* {{{ */
|
||||||
phpdbg_notice("User Classes (%d)", zend_hash_num_elements(&classes));
|
phpdbg_notice("User Classes (%d)", zend_hash_num_elements(&classes));
|
||||||
|
|
||||||
/* once added, assume that classes are stable... until shutdown. */
|
/* once added, assume that classes are stable... until shutdown. */
|
||||||
ZEND_HASH_PACKED_FOREACH_PTR(&classes, ce) {
|
if (HT_IS_INITIALIZED(&classes)) {
|
||||||
phpdbg_print_class_name(ce);
|
ZEND_HASH_PACKED_FOREACH_PTR(&classes, ce) {
|
||||||
|
phpdbg_print_class_name(ce);
|
||||||
|
|
||||||
if (ce->parent) {
|
if (ce->parent) {
|
||||||
if (ce->ce_flags & ZEND_ACC_LINKED) {
|
if (ce->ce_flags & ZEND_ACC_LINKED) {
|
||||||
zend_class_entry *pce = ce->parent;
|
zend_class_entry *pce = ce->parent;
|
||||||
do {
|
do {
|
||||||
phpdbg_out("|-------- ");
|
phpdbg_out("|-------- ");
|
||||||
phpdbg_print_class_name(pce);
|
phpdbg_print_class_name(pce);
|
||||||
} while ((pce = pce->parent));
|
} while ((pce = pce->parent));
|
||||||
} else {
|
} else {
|
||||||
phpdbg_writeln("|-------- User Class %s (not yet linked because declaration for parent was not encountered when declaring the class)", ZSTR_VAL(ce->parent_name));
|
phpdbg_writeln("|-------- User Class %s (not yet linked because declaration for parent was not encountered when declaring the class)", ZSTR_VAL(ce->parent_name));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ce->info.user.filename) {
|
if (ce->info.user.filename) {
|
||||||
phpdbg_writeln("|---- in %s on line %u", ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start);
|
phpdbg_writeln("|---- in %s on line %u", ZSTR_VAL(ce->info.user.filename), ce->info.user.line_start);
|
||||||
} else {
|
} else {
|
||||||
phpdbg_writeln("|---- no source code");
|
phpdbg_writeln("|---- no source code");
|
||||||
}
|
}
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
|
}
|
||||||
|
|
||||||
zend_hash_destroy(&classes);
|
zend_hash_destroy(&classes);
|
||||||
|
|
||||||
|
@ -445,17 +447,19 @@ PHPDBG_INFO(funcs) /* {{{ */
|
||||||
|
|
||||||
phpdbg_notice("User Functions (%d)", zend_hash_num_elements(&functions));
|
phpdbg_notice("User Functions (%d)", zend_hash_num_elements(&functions));
|
||||||
|
|
||||||
ZEND_HASH_PACKED_FOREACH_PTR(&functions, zf) {
|
if (HT_IS_INITIALIZED(&functions)) {
|
||||||
zend_op_array *op_array = &zf->op_array;
|
ZEND_HASH_PACKED_FOREACH_PTR(&functions, zf) {
|
||||||
|
zend_op_array *op_array = &zf->op_array;
|
||||||
|
|
||||||
phpdbg_write("|-------- %s", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "{main}");
|
phpdbg_write("|-------- %s", op_array->function_name ? ZSTR_VAL(op_array->function_name) : "{main}");
|
||||||
|
|
||||||
if (op_array->filename) {
|
if (op_array->filename) {
|
||||||
phpdbg_writeln(" in %s on line %d", ZSTR_VAL(op_array->filename), op_array->line_start);
|
phpdbg_writeln(" in %s on line %d", ZSTR_VAL(op_array->filename), op_array->line_start);
|
||||||
} else {
|
} else {
|
||||||
phpdbg_writeln(" (no source code)");
|
phpdbg_writeln(" (no source code)");
|
||||||
}
|
}
|
||||||
} ZEND_HASH_FOREACH_END();
|
} ZEND_HASH_FOREACH_END();
|
||||||
|
}
|
||||||
|
|
||||||
zend_hash_destroy(&functions);
|
zend_hash_destroy(&functions);
|
||||||
|
|
||||||
|
|
10
sapi/phpdbg/tests/gh15901.phpt
Normal file
10
sapi/phpdbg/tests/gh15901.phpt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--TEST--
|
||||||
|
GH-15901 (phpdbg: Assertion failure on `i funcs`)
|
||||||
|
--PHPDBG--
|
||||||
|
i funcs
|
||||||
|
i classes
|
||||||
|
--EXPECT--
|
||||||
|
prompt> [User Functions (0)]
|
||||||
|
prompt> [User Classes (0)]
|
||||||
|
prompt> [User Classes (0)]
|
||||||
|
prompt>
|
Loading…
Add table
Add a link
Reference in a new issue