From owner-freebsd-java Sat Oct 23 13:34:43 1999 Delivered-To: freebsd-java@freebsd.org Received: from ns.mt.sri.com (ns.mt.sri.com [206.127.79.91]) by hub.freebsd.org (Postfix) with ESMTP id 48AA614E40 for ; Sat, 23 Oct 1999 13:34:38 -0700 (PDT) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.9.3/8.9.3) with SMTP id OAA15465; Sat, 23 Oct 1999 14:34:38 -0600 (MDT) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id OAA09116; Sat, 23 Oct 1999 14:34:37 -0600 Date: Sat, 23 Oct 1999 14:34:37 -0600 Message-Id: <199910232034.OAA09116@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Vince Gonzalez Cc: freebsd-java@FreeBSD.ORG Subject: Re: Illegal instruction In-Reply-To: <19991023155032.A1350@moe.nycrc.net> References: <19991023155032.A1350@moe.nycrc.net> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@mt.sri.com (Nate Williams) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I wrote some code like this: > > public class MyPanel extends JPanel { > public Component add(Component c) { > doSomeStuff(); > return add(c); // This is incorrect on purpose > } > } > > I know the line I've commented is incorrect (it should say super.add(c)). > When this code is run, java_X bombs out with SIGILL and dumps core. I'm > thinking that it should instead die with StackOverflowError. I can reproduce > this very easily, with code very much like the above. I attemped to reproduce this with the following trivial example, and Java behaves as expected with the StackOverflowError. public class Extended extends Base { public static void main(String args[]) { new Extended().foo(new Object()); } public Object foo(Object a) { return foo(a); } } public class Base { public Object foo(Object a) { return foo(a); } } % java -fullversion java_X full version "jdk1.1.8-FreeBSD:1999/9/22" % uname -a FreeBSD moth.mt.sri.com 2.2.8-STABLE FreeBSD 2.2.8-STABLE #4: Tue Jan 26 16:02:55 MST 1999 nate@moth.mt.sri.com:/opt/src/sys/compile/MOTH i386 % [ Note, it's possible that this bug was fixed in the most recent JDK release, hence my earlier question about java -fullversion.... ] Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message