Skip to content

Segmentation fault in ext/zend_test/observer.c #16514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YuanchengJiang opened this issue Oct 20, 2024 · 0 comments
Closed

Segmentation fault in ext/zend_test/observer.c #16514

YuanchengJiang opened this issue Oct 20, 2024 · 0 comments

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
function it() {
yield from [1, 2, 3, 4, 5];
}
function bar($g) {
yield from $g;
}
$gen = it();
$gens[] = bar($gen);
do {
foreach($gens as $g) {
var_dump($g->current());
}
} while ($gen->valid());

Resulted in this output:

/php-src/ext/zend_test/observer.c:168:12: runtime error: member access within null pointer of type 'zend_function' (aka 'union _zend_function')

To reproduce:

-d "zend_test.observer.enabled=1" -d "zend_test.observer.show_init_backtrace=1"

PHP Version

nightly

Operating System

ubuntu 22.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants