View Issue Details

IDProjectCategoryView StatusLast Update
0002349XdebugStep Debuggingpublic2025-05-19 20:01
Reporterlcarilla Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0002349: https://github.com/xdebug/xdebug/commit/3bb2937e94dfcea6359e9f745e534e2049b2d45d breaks throwing exceptions in nested generators
Description

For the code in the "Steps To Reproduce" section, php with xdebug segfaults.
I did some debugging, it turns out to be this commit.
Interesting side note: i could not reproduce the "demo" leading to the heap corruption error that led to this fix commit being made :)

Steps To Reproduce

<?php
function repro(
) {
$b = 1;
foreach (layer1() as $a) {
}
}

 function layer1(
): Generator {
    yield 1;
    yield from layer2();
}

 function layer2(
): Generator
{
    throw new \Exception("some random exception");
    yield 1;
}

repro();

TagsNo tags attached.
Operating SystemLinux
PHP Version8.4-dev

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-05-19 20:01 lcarilla New Issue