Skip to content

Assertion failure in ext/reflection/php_reflection.c:487 #16187

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$xml = <<<XML
<form name="test"></form>
XML;
$simplexml = simplexml_load_string($xml);
$reflector = new ReflectionObject($simplexml['name']);
$fusion = $reflector;
$file_path = __DIR__;
$filename = "/dev/null";
$octal_formats = array( "%o",);
$file_handle = fopen($filename, "r");
foreach($octal_formats as $octal_format) {
while( !feof($file_handle) ) {
try {
var_dump(fscanf($file_handle,$fusion));
} catch (ValueError $exception) {
}
}
}

Resulted in this output:

/php-src/ext/reflection/php_reflection.c:487: void _class_string(smart_str *, zend_class_entry *, zval *, const char *): Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.
Aborted (core dumped)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions