Edit report at http://bugs.php.net/bug.php?id=53632&edit=1
ID: 53632 Updated by: scott...@php.net Reported by: exploringbinary at gmail dot com Summary: PHP hangs on numeric value 2.2250738585072011e-308 -Status: Assigned +Status: Closed Type: Bug Package: Math related PHP Version: 5.3.4 -Assigned To: dmitry +Assigned To: scottmac Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-01-04 23:36:26] scott...@php.net Automatic comment from SVN on behalf of scottmac Revision: http://svn.php.net/viewvc/?view=revision&revision=307095 Log: Fix bug #53632 with x87 fpu ------------------------------------------------------------------------ [2011-01-04 20:21:00] aloucks at cofront dot net PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 03:25:57) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies The bug is NOT present in this version. ------------------------------------------------------------------------ [2011-01-04 19:30:56] ras...@php.net Guys, we already know the problem. We are hitting an annoying x87 FPU design flaw. You can read all about it here if you are interested: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 And there is a good paper on it here: http://hal.archives-ouvertes.fr/docs/00/28/14/29/PDF/floating-point-article.pdf We don't need any more compile reports. If you are on an architecture that uses the x87 FPU and you haven't forced SSE or float-store then you will see this problem. ------------------------------------------------------------------------ [2011-01-04 19:11:29] hieu dot ld at vnnb dot net Re: last comment, I believe "-mfpmath=sse" did the trick. apologies for cluttering the bug report. ------------------------------------------------------------------------ [2011-01-04 19:06:34] hieu dot ld at vnnb dot net Does not reproduce on php 5.3.4 (with gentoo patches, compiled -O2). dri...@undine ~/h $ cat numericval.php <?php $d = 2.2250738585072011e-308; echo $d + 0; echo "\n"; ?> dri...@undine ~/h $ php numericval.php 2.2250738585072E-308 dri...@undine ~/h $ php -v PHP 5.3.4-pl0-gentoo (cli) (built: Dec 24 2010 14:24:29) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies dri...@undine ~/h $ uname -a Linux undine 2.6.28-hardened-r9-hrd-undine #1 SMP Thu Nov 12 02:29:42 CET 2009 i686 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz GenuineIntel GNU/Linux Configure Command => './configure' '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--prefix=/usr/lib/php5.3' '--mandir=/usr/lib/php5.3/man' '--infodir=/usr/lib/php5.3/info' '--libdir=/usr/lib/php5.3/lib' '--with-libdir=lib' '--without-pear' '--enable-maintainer-zts' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--with-curl' '--without-curlwrappers' '--without-enchant' '--enable-exif' '--enable-ftp' '--with-gettext' '--without-gmp' '--disable-intl' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--without-mssql' '--with-onig=/usr' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl' '--with-pgsql' '--without-pspell' '--without-recode' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--with-tidy' '--disable-wddx' '--with-xmlrpc' '--without-xsl' '--enable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--without-db4' '--disable-flatfile' '--with-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl' '--without-interbase' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=/usr/bin/mysql_config' '--without-oci8' '--without-pdo-dblib' '--with-pdo-mysql=/usr' '--with-pdo-pgsql' '--with-pdo-sqlite=/usr' '--without-pdo-odbc' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8' '--with-pic' '--with-pcre-regex=/usr' '--with-pcre-dir=/usr' '--with-config-file-path=/etc/php/cli-php5.3' '--with-config-file-scan-dir=/etc/php/cli-php5.3/ext-active' '--enable-cli' '--disable-cgi' '--disable-fpm' '--disable-embed' '--without-apxs2' CFLAGS="-march=core2 -mfpmath=sse -O2 -pipe -fforce-addr -fomit-frame-pointer" ------------------------------------------------------------------------ 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=53632 -- Edit this bug report at http://bugs.php.net/bug.php?id=53632&edit=1