From: ryan dot brothers at gmail dot com Operating system: Linux PHP version: 5.5Git-2013-06-13 (snap) Package: Reproducible crash Bug Type: Bug Bug description:yield / exit segfault
Description: ------------ The following script causes a segfault. It is occurring when exit is called in a function that is called from a generator function. Test script: --------------- <?php function f1() { f2(); $i = 0; yield $i; } function f2() { exit; } $rows = f1(); foreach ($rows as $row) { } Expected result: ---------------- Script exits with no output. Actual result: -------------- [Thu Jun 13 18:44:50 2013] Script: '/tmp/test.php' --------------------------------------- /usr/local/src/php5.5-201306132030/Zend/zend_execute.h(196) : Block 0x7f7b17658d28 status: Beginning: Freed Start: OK End: Overflown (magic=0x0000005A instead of 0xEAF0B464) At least 4 bytes overflown --------------------------------------- -- Edit bug report at https://bugs.php.net/bug.php?id=65035&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65035&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65035&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65035&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65035&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65035&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65035&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65035&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65035&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65035&r=support Expected behavior: https://bugs.php.net/fix.php?id=65035&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65035&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65035&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65035&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65035&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65035&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65035&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65035&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65035&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65035&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65035&r=mysqlcfg