Skip to content

SEGV SplTempFileObject getPathInfo #17516

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$cls = new SplTempFileObject();
trait T1 { function m1() { } function m2() { } }
class C4 { use T1 { m1 as a1; m2 as a2; } }
$classes  = ['C1', 'C2', 'C3', 'C4'];
foreach ($classes as $c) {
}
$cls->getPathInfo($c);

Resulted in this output:

/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/spl/spl_directory.c:487:23: runtime error: member access within null pointer of type 'zend_function' (aka 'union _zend_function')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/spl/spl_directory.c:487:23

PHP Version

nightly

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions