Skip to content

Conversation

iluuu1994
Copy link
Member

Fixes GH-20183

@iluuu1994 iluuu1994 requested a review from dstogov as a code owner October 15, 2025 19:21
@nielsdos nielsdos linked an issue Oct 15, 2025 that may be closed by this pull request
@arnaud-lb
Copy link
Member

The same change needs to be applied to zend_generator_dtor_storage():

function gen() {
    try {
        yield 1;
    } finally {
        eval('try { throw new Error(); } catch (Error) {}');
        debug_print_backtrace();
    }
}

class A {
    private $gen;
    function __construct() {
        $this->gen = gen();
        $this->gen->rewind();
    }
}

B::$a = new A();

This looks right to me otherwise.

@iluuu1994
Copy link
Member Author

Good catch. Let me go through all instances of EG(exception) = NULL;.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale EG(opline_before_exception) pointer through eval

2 participants