PHP 4.0 Bug #7617 Updated: Floating point exception when starting PHP cgi binary

From: Date: Sat, 23 Dec 2000 13:59:06 +0000
Subject: PHP 4.0 Bug #7617 Updated: Floating point exception when starting PHP cgi binary
Groups: php.dev 
Request: Send a blank email to php-dev+get-42172@lists.php.net to get a copy of this message
ID: 7617 User Update by: bjoern@baer.main.de Old-Status: Feedback Status: Closed Bug Type: Reproduceable crash Description: Floating point exception when starting PHP cgi binary 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. Previous Comments: --------------------------------------------------------------------------- [2000-11-29 15:57:49] sniper@php.net Do you have any example code (short) which can be used to reproduce this? --Jani --------------------------------------------------------------------------- [2000-11-28 18:33:26] bjoern@baer.main.de Doesn't work :-( --------------------------------------------------------------------------- [2000-11-03 12:56:51] bjoern@baer.main.de Same result as above. --------------------------------------------------------------------------- [2000-11-03 11:41:05] sniper@php.net please update your cvs..and if it still crashes, reopen this bug report. --Jani --------------------------------------------------------------------------- [2000-11-03 07:19:28] bjoern@baer.main.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)); --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=7617

« previous php.dev (#42172) next »