#25665 [Csd]: var_dump/print_r hang on NaN and INF

From: Date: Thu, 03 Jun 2004 18:42:49 +0000
Subject: #25665 [Csd]: var_dump/print_r hang on NaN and INF
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-60333@lists.php.net to get a copy of this message
ID: 25665 Updated by: helly@php.net Reported By: eru@php.net Status: Closed Bug Type: *General Issues Operating System: * PHP Version: 4CVS, 5CVS Assigned To: helly New Comment: Which platform are you running? Previous Comments: ------------------------------------------------------------------------ [2004-06-03 11:04:18] neilus at dcs dot kcl dot ac dot uk this is re-occurring in the 4.3 branch tests, so either the test or bug needs to be fixed ------------------------------------------------------------------------ [2003-09-28 21:07:06] iliaa@php.net This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2003-09-26 05:46:38] sniper@php.net It's the ap_php_cvt() which ends up in endless loop since it can't handle infinite numbers at all. In PHP 4.2.3 the output of var_dump(log(0)); is float(-INF).. Marcus..you broke this, fix it. ------------------------------------------------------------------------ [2003-09-25 23:21:04] eru@php.net Description: ------------ Summary and reproducing code say all... I tested it on a 4.3.0 and got NAN -INF float(0.E+79) float(-0.E+79) which isn't correct on the var_dump behaviour either, but at least I hadn't had a hanging program. Reproduce code: --------------- <?php print_r(acos(1.01)); print_r(log(0)); var_dump(acos(1.01)); var_dump(log(0)); ?> Expected result: ---------------- Some output saying NaN and INF. Actual result: -------------- Nothing. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25665&edit=1

« previous php.bugs (#60333) next »