Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 1997 14:35:17 -0700
From:      pius@ienet.com
To:        Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: netscape floating exception 3.01 under 3.0-current
Message-ID:  <199705202135.OAA23758@iago.ienet.com>

next in thread | raw e-mail | index | archive | help


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
<script>""+1.0E10;</script>
/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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705202135.OAA23758>