You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Null pointer access of type 'zval' in phpdbg_frame #13827
--TEST--
UBSan phpdbg_frame member access within null pointer of type 'zval'
--FILE--
<?php
class C {
public function __destruct() {
echo __METHOD__, "\n";
}
}
$fiber = new Fiber(function () {
$c = new C();
$fiber = Fiber::getCurrent();
Fiber::suspend();
});
$fiber->start();
gc_collect_cycles();
$fiber = null;
gc_collect_cycles();
?>
--PHPDBG--
r
t
ev 1 + 2
c
q
--EXPECT--
C::__destruct
Resulted in this output:
[Successful compilation of /test.php]
prompt> [Uncaught GracefulExit in on line 0: ]
>00014: Fiber::suspend();
00015: });
00016:
prompt> frame #0: {closure}() at /test.php:14
//php-src/sapi/phpdbg/phpdbg_frame.c:295:2: runtime error: member access within null pointer of type 'zval' (aka 'struct _zval_struct')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/sapi/phpdbg/phpdbg_frame.c:295:2 in
Activity
Fix phpGH-13827: Null pointer access of type 'zval' in phpdbg_frame
Merge branch 'PHP-8.2' into PHP-8.3
Merge branch 'PHP-8.3'
Fix GH-13827: Null pointer access of type 'zval' in phpdbg_frame