From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27375 invoked by alias); 18 Jun 2002 15:07:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26877 invoked by uid 71); 18 Jun 2002 15:06:12 -0000 Date: Tue, 18 Jun 2002 08:07:00 -0000 Message-ID: <20020618150611.26871.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Tom Tromey Subject: Re: java/7066: gcj generates invalid bytecode for inner classes Reply-To: Tom Tromey X-SW-Source: 2002-06/txt/msg00419.txt.bz2 List-Id: The following reply was made to PR java/7066; it has been noted by GNATS. From: Tom Tromey To: Bruno Haible Cc: gcc-gnats@gcc.gnu.org Subject: Re: java/7066: gcj generates invalid bytecode for inner classes Date: 18 Jun 2002 09:12:43 -0600 >>>>> "Bruno" == Bruno Haible writes: Bruno> $ CLASSPATH=3D. gij GetURL $someurl Bruno> Retrieving http://localhost/...Exception in thread "main" java.lang.Int= Bruno> ernalError: Thread.start called but threads not available This means you didn't configure with --enable-threads, but your program uses threads. Bruno> $ java -version Bruno> java version "1.3.1_02" This is part of the problem... Bruno> Method GetURL$1(GetURL) Bruno> 0 aload_0 Bruno> 1 aload_1 Bruno> 2 putfield #12 Bruno> 5 aload_0 Bruno> 6 invokespecial #15 Bruno> 9 return This is valid bytecode according to the 1.4 spec. The 1.3 JDK doesn't like it though; they added a special exception to the verifier to let code like this through. If you use the 1.4 "javac" you'll also see this. There was some discussion of this issue on the java list recently. Apparently the 1.4 javac is capable of generating 1.3-compatible bytecode, though the result can fail in some situations. Eric explained it in detail. Tom