public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: alberto.biancardi@unipv.it
To: gcc-gnats@gcc.gnu.org
Subject: libgcj/6187: method distance of class java.awt.geom.Point2D causes infinite recursion
Date: Fri, 05 Apr 2002 06:56:00 -0000	[thread overview]
Message-ID: <20020405144948.16933.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-04-05 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-05  6:56 alberto.biancardi [this message]
2002-04-08  7:47 tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020405144948.16933.qmail@sources.redhat.com \
    --to=alberto.biancardi@unipv.it \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).