Bug #9297 Updated: sprintf ("%f", $foo) crashes with very large $foo.

From: Date: Tue, 12 Jun 2001 21:15:35 +0000
Subject: Bug #9297 Updated: sprintf ("%f", $foo) crashes with very large $foo.
Groups: php.dev 
Request: Send a blank email to php-dev+get-57181@lists.php.net to get a copy of this message
ID: 9297 Updated by: sniper Reported By: ben@bpeter.org Old-Status: Feedback Status: Closed Bug Type: Strings related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: It does not crash with PHP 4.0.6RC3: http://www.php.net/~andi/php-4.0.6RC3.tar.gz --Jani Previous Comments: --------------------------------------------------------------------------- [2001-05-22 01:04:21] derick@php.net It does something strange for me: [root@mars lib]# /usr/local/bin/php -q <? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%fnn", $foo) ?> 2286484951194899000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022864849511948990000000000000000000000000000000000000000000000000000000000000000. This is with 4.0.6-dev (latest CVS (22/05/2001)). Derick --------------------------------------------------------------------------- [2001-04-30 09:52:57] cmv@php.net Works fine for me (RH7 and latest CVS): [cmv@sunniva cmv]$ echo '<? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%fn", $foo) ?>' | php X-Powered-By: PHP/4.0.6-dev Content-type: text/html 2286484951194899000000000000000000000000000000000000000000000000000000000000000n[cmv@sunniva cmv] --------------------------------------------------------------------------- [2001-04-30 09:17:45] andi@php.net Can you please try the latest CVS or a snapshot from snaps.php.net and let us know if this still happens. I can't reproduce it on redhat 6.2. Thanks. --------------------------------------------------------------------------- [2001-02-16 10:34:20] ben@bpeter.org [ben@home ben]$ echo '<? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%fn", $foo) ?>' | php X-Powered-By: PHP/4.0.4pl1 Content-type: text/html 2286484951194899000000000000000000000000000000000000000000000000000000000000000 Segmentation fault (core dumped) --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9297&edit=2

« previous php.dev (#57181) next »