Skip to content

Segmentation fault in ext/spl/spl_directory.c #16477

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$obj = new SplFileObject(__FILE__);
function test($function) {
try {
@$function();
} catch (Throwable) {
}
}
foreach (get_declared_classes() as $class) {
foreach (get_class_methods($class) as $method) {
test([$obj, $method]);
}
}

Resulted in this output:

/php-src/ext/spl/spl_directory.c:650:3: runtime error: member access within null pointer of type 'zend_string' (aka 'struct _zend_string')

PHP Version

nightly

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