Bug #81627 [NEW]: Incorrect result of php

From: Date: Tue, 16 Nov 2021 15:49:06 +0000
Subject: Bug #81627 [NEW]: Incorrect result of php
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237793@lists.php.net to get a copy of this message
From: shaohua dot li at inf dot ethz dot ch Operating system: Ubuntu 20.04.3 LTS PHP version: 8.1Git-2021-11-16 (Git) Package: *General Issues Bug Type: Bug Bug description:Incorrect result of php Description: ------------ Hi there, I compiled php-src twice with clang13 -O0 and -O2 (default). However, for the following code sample, the two ./sapi/cli/php would evaluate it differently. For "clang13 -O0" compiled one, "bug" would be printed. However, "clang13 -O2" wouldn't. Test script: --------------- <?php function test() { $n = $a = 0; while($a <= 0) { $a &= $a-- + $a; if (++$n > 59) die("bug\n"); } } test(); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=81627&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81627&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81627&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81627&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81627&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81627&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81627&r=support Expected behavior: https://bugs.php.net/fix.php?id=81627&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81627&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81627&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81627&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81627&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81627&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81627&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81627&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81627&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81627&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81627&r=mysqlcfg

« previous php.bugs (#237793) next »