From owner-freebsd-questions Tue May 20 14:35:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA27738 for questions-outgoing; Tue, 20 May 1997 14:35:52 -0700 (PDT) Received: from iago.ienet.com (iago.ienet.com [207.78.32.53]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA27732 for ; Tue, 20 May 1997 14:35:48 -0700 (PDT) Received: from iago.ienet.com (localhost.ienet.com [127.0.0.1]) by iago.ienet.com (8.8.5/8.8.5) with ESMTP id OAA23758 Tue, 20 May 1997 14:35:17 -0700 (PDT) Message-Id: <199705202135.OAA23758@iago.ienet.com> From: pius@ienet.com To: Christoph Kukulies Cc: freebsd-questions@freebsd.org Subject: Re: netscape floating exception 3.01 under 3.0-current Date: Tue, 20 May 1997 14:35:17 -0700 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 16 May 1997, kuku@gilberto.physik.RWTH-Aachen.DE wrote: > Very strange: On one of my 3.0-current systems running > Netscape-301 (netscape-v301-export.x86-unknown-bsd.tar.gz) > I'm getting a Floating Exception and netscape dies > when I click on the [Net Search] button. It appears that Netscape has a bug in its JavaScript implementation that causes it to crash when converting a large number to a string. (At least the BSD version you mention above has this bug.) For example, the following one-liner will crash your browser: /home/pius>cat test.html /home/pius>netscape file:/home/pius/test.html Floating exception /home/pius>netscape -v Netscape 3.01/export, 20-Oct-96; (c) 1995,1996 Netscape Communications Corp. /home/pius> When you click on the Net Search button, Netscape will load http://home.netscape.com/escapes/search/ which contains JavaScript that gets the number of milliseconds elapsed since January 1, 1970 00:00:00 and then tries to convert that number to a string. On a similar note, you can compile the following Java applet, refer to it in an applet tag in an HTML page, load the page, and that same version of Netscape will crash on a floating- point exception: public final class div0bug extends java.applet.Applet { public void init() { invert(0.0); } public double invert(double number) { return 1 / number; } } Regards, Pius