From:             alefor at gmx dot de
Operating system: Debian/unstable r3.01 GNU/Linux
PHP version:      4.3.3
PHP Bug Type:     Scripting Engine problem
Bug description:  var_dump endless loops with NAN or INF float

Description:
------------
var_dump a float with inf/nan value lead to an endless loop.
Same result for cli php and for apache module.
GDB backtrace follows, taken suspending the endless loop execution.
(gdb) bt
#0  0x0810bd85 in ap_php_cvt ()
#1  0x0810bfd6 in ap_php_ecvt ()
#2  0x0810c05d in ap_php_gcvt ()
#3  0x0810c86a in ap_php_gcvt ()
#4  0x0810ccd6 in vspprintf ()
#5  0x08108ef8 in php_printf ()
#6  0x080e7507 in php_var_dump ()
#7  0x080e77a5 in zif_var_dump ()
#8  0x081400e7 in execute ()
#9  0x08133349 in zend_execute_scripts ()
#10 0x0810b5fd in php_execute_script ()

ap_php_cvt family is in main/snprintf.c file.

Reproduce code:
---------------
$str = "inf ";
$f = (float)$str;
var_dump($f);

Expected result:
----------------
Don't know. Maybe "float(INF)" ?

Actual result:
--------------
Endless loop. No output.

-- 
Edit bug report at http://bugs.php.net/?id=25949&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25949&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25949&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25949&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25949&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25949&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25949&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25949&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25949&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25949&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25949&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25949&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25949&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25949&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25949&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25949&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25949&r=float

Reply via email to