Edit report at http://bugs.php.net/bug.php?id=51396&edit=1
ID: 51396 Comment by: codeslinger at compsalot dot com Reported by: codeslinger at compsalot dot com Summary: Math is Unreliable Status: Bogus Type: Bug Package: Math related Operating System: any PHP Version: Irrelevant New Comment: Pajoye Please take a look at #43487 this appears to be where the Mandriva Devs landed their change. Quote: "as peroyvind found, the miscompilation is inside Zend/zend_strtod.c, and -no-ftree-vrp workaround the bug." Unfortunately that change does not appear to have done the trick. This thing is dang hard to reproduce, short of running through every possible 58 digit number, or getting really lucky with random numbers, I can't see how to reliably test this. Previous Comments: ------------------------------------------------------------------------ [2010-05-24 14:14:53] paj...@php.net And please use latest 5.3 or 5.2, from our downloads (only). ------------------------------------------------------------------------ [2010-05-24 14:04:53] codeslinger at compsalot dot com P.S. Please note that in my own testing I have verified that the presence or absence of the xdebug and zend debug extensions do not alter the behavior of this bug, this was verified on Windows. Also note how for instance 5.2.4 fails on Windows and on Ubuntu but works on Mandriva (or at least was not found to fail on Mandriva). Also I can tell you from my own testing that the specific values which fail on Windows are very different from the specific values which fail on Unbuntu, when tested on the same computer. The only thing which can be said with some level of confidence is that all of the failures involve numbers with the digit 9 in them. Since these are 58? digit numbers and only a very few specific values fail, the potential to NOT see a failure is huge. ------------------------------------------------------------------------ [2010-05-24 13:59:45] paj...@php.net Please read my last comment and provide the info I asked there. Without that, there is not a chance to get anywhere regarding this issue. ------------------------------------------------------------------------ [2010-05-24 13:46:10] codeslinger at compsalot dot com In Summary: As Reported by Multiple People Windows XP (32 bit) PHP 5.2.4 Fails Windows XP (32 bit) PHP 5.2.5 Works Windows 2000 (32 bit) PHP 5.2.5 Works Windows XP (32 bit) PHP 5.2.9 Fails Windows 2000 (32 bit) PHP 5.2.9 Fails Windows 2000 (32 bit) PHP 5.2.11 Fails Windows 2003 (?? bit) PHP 5.2.12 Fails Windows 2003 (?? bit) PHP 5.2.13 Fails Ubuntu 8 (32bit) PHP 5.2.4 Fails Ubuntu 8 (32bit) PHP 5.2.9 (custom build) Works Ubuntu 9 (64bit) PHP 5.2.10 Works Mandriva 2008 (32bit & 64bit) PHP 5.2.4 Works Mandriva 2008 (32bit & 64bit) Unpatched PHP 5.2.5 Fails This bug has been reported by multiple people. The above list is the combination of my own testing plus what I found reported by other people. The windows oses are all using the STOCK BUILD as provided by php.net It is very important to understand that the specific values which fail are highly variable. A specific value which fails on one os/php version does not necessarily fail on a different combination of os+php, but a different value will fail instead. It is also important to realize that given the obscurity and variability of this bug, just because a particular version of php is reported as working, does not guarantee that the bug does not exist, it only says that so far no one has reported encountering a specific value which triggers this bug. All of the following are thought to influence the specific behavior and reproducibility of this bug. The number of cpu bits The operating system The specific version of php The compiler flags that were used to build php The "precision" setting for php The format specifier/precision in an sprintf statement sprintf versus implied (string) conversion It is also possible that the floating point hardware could have an influence on the reproducibility of this bug. Since the WORK-AROUND did not work for John, it would appear that we still have a problem which needs to be solved. ------------------------------------------------------------------------ [2010-05-24 03:17:36] john dot smith dot 1964 at gmail dot com This problem isn't fixed for us by adding "ini_set("precision", 16);". Our PHP install is stock off the website (5.2.4 and 5.2.13, for instance) and our box runs Windows 2003. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51396 -- Edit this bug report at http://bugs.php.net/bug.php?id=51396&edit=1