Skip to content

Assertion failure in xml_parse_into_struct after exception #15868

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$parser = xml_parser_create();
xml_set_element_handler($parser, function ($parser, $name, $attrs) {
var_dump(xml_parse_into_struct($fusion, "<container/>", $values, $tags));
}, function ($parser, $name) {
});
xml_parse_into_struct($parser, "<container/>", $values, $tags);

Resulted in this output:

/php-src/Zend/zend_hash.c:906: _zend_hash_str_add_or_update_i: Assertion `(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' failed.
Aborted (core dumped)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions