Bug #74234 [NEW]: Op Code is generated on wrong line

From: Date: Fri, 10 Mar 2017 17:42:11 +0000
Subject: Bug #74234 [NEW]: Op Code is generated on wrong line
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207773@lists.php.net to get a copy of this message
From: scott at exussum dot co dot uk Operating system: Linux (ubuntu 16.10) PHP version: 7.1.2 Package: *General Issues Bug Type: Bug Bug description:Op Code is generated on wrong line Description: ------------ The op code for the jmp seems to be generated against the wrong line for the continue. (See script below) 6 9 > EXT_STMT 10 > JMPZ <false>, ->13 7 11 > EXT_STMT 12 > JMP ->8 13 > > JMP ->8 14 > FE_FREE $3 Pasted from Derick HP unfortunately doesn't reset the line numbers for some of the generated code: 6 9 > EXT_STMT 10 > JMPZ <false>, ->13 7 11 > EXT_STMT 12 > JMP ->8 13 > > JMP ->8 14 > FE_FREE $3 The JMP in line 12 (and line 13) is generated for line 7, and not 8. This is something that needs to be fixed in PHP itself See https://bugs.xdebug.org/view.php?id=1405#c4232 for more info Test script: --------------- foreach([1,2] as $value) { if (false) { continue; } } -- Edit bug report at https://bugs.php.net/bug.php?id=74234&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74234&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74234&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74234&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74234&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74234&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74234&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74234&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74234&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74234&r=support Expected behavior: https://bugs.php.net/fix.php?id=74234&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74234&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74234&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74234&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74234&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74234&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74234&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74234&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74234&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74234&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74234&r=mysqlcfg

« previous php.bugs (#207773) next »