public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libgcj/6187: method distance of class java.awt.geom.Point2D causes infinite recursion
@ 2002-04-08  7:47 tromey
  0 siblings, 0 replies; 2+ messages in thread
From: tromey @ 2002-04-08  7:47 UTC (permalink / raw)
  To: alberto.biancardi, gcc-bugs, gcc-prs, java-prs, nobody, tromey

Synopsis: method distance of class java.awt.geom.Point2D causes infinite recursion

Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Mon Apr  8 07:47:38 2002
Responsible-Changed-Why:
    I'm handling this.
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Mon Apr  8 07:47:38 2002
State-Changed-Why:
    Thanks for your patch.
    I'm checking it in on the trunk.
    I'll try to check it in on the branch, too (so it will appear
    in 3.1), but that depends on the current branch status.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6187


^ permalink raw reply	[flat|nested] 2+ messages in thread

* libgcj/6187: method distance of class java.awt.geom.Point2D causes infinite recursion
@ 2002-04-05  6:56 alberto.biancardi
  0 siblings, 0 replies; 2+ messages in thread
From: alberto.biancardi @ 2002-04-05  6:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6187
>Category:       libgcj
>Synopsis:       method distance of class java.awt.geom.Point2D causes infinite recursion
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 05 06:56:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     alberto.biancardi@unipv.it
>Release:        3.0.4
>Organization:
>Environment:
i686-pc-linux-gnu
uname -r: 2.2.14-5.0
>Description:
the implementation of the static method distance
of class java.awt.geom.Point2D calls itself instead
of static method distanceSq thus causing an infinite
recursion and a stack overflow

>How-To-Repeat:
class TestPoint2D {
    public static void main(String[] args) {
	java.awt.geom.Point2D.distance( 0.0, 0.0, 1.0, 1.0);
    }
}
>Fix:
--- Point2D.java.orig	Mon Dec  4 03:27:21 2000
+++ Point2D.java	Fri Apr  5 16:05:39 2002
@@ -41,7 +41,7 @@
 
   static public double distance (double X1, double Y1, double X2, double Y2)
   {
-    return Math.sqrt(distance(X1, Y1, X2, Y2));
+    return Math.sqrt(distanceSq(X1, Y1, X2, Y2));
   }
 
   public double distanceSq (double PX, double PY)
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-08 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08  7:47 libgcj/6187: method distance of class java.awt.geom.Point2D causes infinite recursion tromey
  -- strict thread matches above, loose matches on Subject: below --
2002-04-05  6:56 alberto.biancardi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).