php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9827 Floating point exception when starting apache
Submitted: 2001-03-18 21:43 UTC Modified: 2001-10-20 23:06 UTC
From: matti at weiersmueller dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.6 OS: Linux-mips
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: matti at weiersmueller dot com
New email:
PHP Version: OS:

 

 [2001-03-18 21:43 UTC] matti at weiersmueller dot com
- HW: Cobalt Raq2 (MIPS R3000)
- OS: Linux
- Apache: 1.3.19
- PHP built with these arguments:
  --with-apxs
  --enable-trans-sid
- PHP release: 4.0.4pl1 and the latest CVS snapshot (date 18/03/2001)

when starting apache with "./httpd", a core is dumped. The message is: Floating point exception (core dumped)

I played around with gdb, the exception occurs in:

ext/standard/crypt.c:105
------------------------
php_srand(time(0) * getpid() * php_combined_lcg() * 10000.0 );

I played around with this line. When I replace the value 10000.0 with 1.0 and recompile the stuff, it works. I'm no C programmer, but I think this is due to an overflow problem.

If you need more informations, tell me!

Best regards

Matti Weiersmueller

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-18 21:51 UTC] matti at weiersmueller dot com
The calculation itself does not lead to the overflow. I inserted this line right before the error happens:

fprintf (stdout, "Value: %f", ..calculation comes here ...);

So I guess the function accepts only numbers to a certain size. (values over approx. 2^34 or under 2^-34 makes apache hurl)
 [2001-05-07 04:45 UTC] zeev@php.net
Can you please see if this still happens in PHP 4.0.5?  It's supposed to be fixed.
 [2001-05-10 14:42 UTC] matti at weiersmueller dot com
no, it still behaves the same when using 4.0.5.

 [2001-08-21 16:14 UTC] matti at weiersmueller dot com
still not fixed in 4.0.6
 [2001-10-20 23:06 UTC] sniper@php.net
Fixed in CVS.

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 06:01:27 2025 UTC