From: moondream at moondream dot de Operating system: Gentoo Linux PHP version: 5.1.0 PHP Bug Type: Scripting Engine problem Bug description: eval hangs when evall'ed code ends with comment w/o newline
Description: ------------ If the eval'ed code ends with a comment which is not termiated by a newline, eval hangs in an endless loop. If the comment is followed by a newline, there is no hang. This causes phpBB2 on php 5.1 to hang. Reproduce code: --------------- <?php $v='echo "Test\n"; // comment'; $w=$v."\n"; echo "Eval 1:"; eval ($w); echo "Eval 2:"; eval ($v); ?> Expected result: ---------------- The code sample returns after printing: Eval 1:Test Eval 2:Test Actual result: -------------- The code hangs after: Eval 1:Test Eval 2: -- Edit bug report at http://bugs.php.net/?id=35406&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35406&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35406&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35406&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35406&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35406&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35406&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35406&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35406&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35406&r=support Expected behavior: http://bugs.php.net/fix.php?id=35406&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35406&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35406&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35406&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35406&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35406&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35406&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35406&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35406&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35406&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35406&r=mysqlcfg