Bug #1914: number_format causes segfault on NaN
| From: | ccunning at math dot ohio-state dot edu | Date: | Wed, 28 Jul 1999 22:43:47 +0000 |
| Subject: | Bug #1914: number_format causes segfault on NaN | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9299@lists.php.net to get a copy of this message | ||
From: ccunning@math.ohio-state.edu
Operating system: Solaris 2.6
PHP version: 4.0b1
PHP Bug Type: Reproduceable crash
Bug description: number_format causes segfault on NaN
number_format causes a segfault when used on a variable that has been evaluated to NaN or a string
NaN.
<?
$one = sqrt(-50); // or $one = "NaN";
$out = number_format($one,12);
echo $out;
?>
Error Log:
Script: '/opt/web/htdocs/test.php'
---------------------------------------
math.c(641) : Block 0x00120270 status:
Beginning: Overrun (magic=0x0000119D, expected=0x7312F8DC)
End: Unknown
---------------------------------------
Script: '/opt/web/htdocs/test.php'
---------------------------------------
zend_hash.c(746) : Block 0x00120038 status:
Beginning: Overrun (magic=0x732E7068, expected=0x7312F8DC)
End: Unknown
---------------------------------------
[Wed Jul 28 17:24:54 1999] [notice] child pid 13289 exit signal Segmentation
Fault (11)
dbx:
In add vars
signal BUS (invalid address alignment) in _get_zval_ptr_ptr at 0xef3042c0
0xef3042c0: _get_zval_ptr_ptr+0x003c: ld [%o1 + 0xc], %o0