php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7617 Floating point exception when starting PHP cgi binary
Submitted: 2000-11-03 06:10 UTC Modified: 2001-01-09 17:45 UTC
From: bjoern at baer dot main dot de Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Latest CVS (29/11/2000) OS: FreeBSD 3.3
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: bjoern at baer dot main dot de
New email:
PHP Version: OS:

 

 [2000-11-03 06:10 UTC] bjoern at baer dot main dot de
Configuring, making PHP with the following options:

./configure \
#  --with-apxs=/usr/local/apache/bin/apxs \
  --with-config-file-path=/usr/local/apache/conf/ \
  --with-ssl=/usr/local/openssl \
  --with-gd=/usr/local \
  --enable-t1lib=/usr/local \
  --with-mysql=/usr/local \
  --enable-track-vars \
  --with-mcrypt \
  --with-xml \
  --with-yp \
  --with-ldap \
  --enable-ftp \
  --with-ttf \
  --enable-sysvshm \
  --enable-sysvsem \
  --enable-url-fopen-wrapper=yes \
  --enable-versioning \
  --enable-dba

make compiles a PHP binary, but:

www@w3bus:/usr/local/src/baerli/php4 > ./php
Floating point exception (core dumped)

It dumps a php.core (536576 Bytes), but I don't know how to analyze it?

TIA, Bj?rn.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-03 07:19 UTC] bjoern at baer dot main dot de
gdb php php.core shows:

Core was generated by `php'.
Program terminated with signal 8, Floating point exception.
Reading symbols from /usr/lib/libpam.so.1...done.
Reading symbols from /usr/lib/libstdc++.so.2...done.
Reading symbols from /usr/lib/libg++.so.4...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libc_r.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x80820ed in php_minit_crypt (type=1, module_number=2,
    executor_globals=0x813e800) at crypt.c:109
109             srand48((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));       
 [2000-11-03 11:41 UTC] sniper@php.net
please update your cvs..and if it still crashes, reopen
this bug report.

--Jani
 [2000-11-03 12:56 UTC] bjoern at baer dot main dot de
Same result as above.
 [2000-11-28 18:33 UTC] bjoern at baer dot main dot de
Doesn't work :-(
 [2000-11-29 15:57 UTC] sniper@php.net
Do you have any example code (short) which can be used to reproduce this?

--Jani
 [2000-12-23 08:59 UTC] bjoern at baer dot main dot de
It works now when changing line 109 in ext/standard/crypt.c to the following code:

srand48((long)time(NULL) * (long)getpid() * (long)(php_combined_lcg()*(double)10000.0));

With this code PHP doesn't crash under FreeBSD with a floating point exception and everything works fine. Please be so kind and change the code in CVS, thanks.
 [2001-01-09 17:45 UTC] sniper@php.net
Fix committed by Derick Rethans. 

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Oct 09 22:00:02 2026 UTC