ID: 9323 Updated by: derick Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Reproduceable crash Assigned To: Comments: Already fixed in CVS. You can use a snapshot from snaps.php.net or use the CVS version. Previous Comments: --------------------------------------------------------------------------- [2001-02-17 21:06:11] [EMAIL PROTECTED] Built on an old release of FreeBSD (2.2.5). I think that current releases might mask most FPE exceptions by default, but I do not know that for sure. I also think that Linux masks all exceptions also, so the bug is concealed on those systems. I tracked the problem down to ext/standard/crypt.c, the line: srand48((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0)); Sorry, I no longer have the buggy version built so I can't get you a gdb backtrace. However, the problem is simply that the double result is too large to fit in a 32-bit integer and the SIGFPE occurs. Note that even if one masks the exception, there is still the problem that the result will then become zero (see the intel x86 documentation) -- not a very good thing to seed a random number generator with. As a quick fix, I just changed the line to: srand48((unsigned int) time(0) * getpid()); since integer overflow doesn't cause an exception. Note that this bug is probably related to #9106. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9323&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]