php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8535 Floating point exception on httpd start
Submitted: 2001-01-03 10:46 UTC Modified: 2001-01-08 15:47 UTC
From: KOT at MATPOCKuH dot SPb dot Ru Assigned:
Status: Closed Package: *Web Server problem
PHP Version: 4.0.4 OS: FreeBSD 3.3-STABLE
Private report: No CVE-ID: None
 [2001-01-03 10:46 UTC] KOT at MATPOCKuH dot SPb dot Ru
When running httpd I got the following error:
Floating point exception - core dumped.

After analysing of core file I found that error is here:
php-4.0.4/ext/standard/crypt.c (109):
srand48((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));

I have changed this line with:
srand48((long)time(0) * (long)getpid() * (long)(php_combined_lcg() * 10000.0));

and error disappeared...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-03 10:48 UTC] sniper@php.net
This is fixed already. Try latest snapshot from
http://snaps.php.net/


--Jani
 [2001-01-08 15:47 UTC] derick@php.net
This was NOT fixed in cvs. Another user reported the segfault, after changing the suggested line, it compiled and worked fine.



Fixed in CVS now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC