From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13996 invoked by alias); 1 Mar 2002 00:26:05 -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 13972 invoked by uid 71); 1 Mar 2002 00:26:03 -0000 Date: Thu, 28 Feb 2002 22:56:00 -0000 Message-ID: <20020301002602.13970.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Tom Tromey Subject: Re: java/5794: gcj fails to verify .class file generated by Sun JDK 1.4 compiler Reply-To: Tom Tromey X-SW-Source: 2002-02/txt/msg00771.txt.bz2 List-Id: The following reply was made to PR java/5794; it has been noted by GNATS. From: Tom Tromey To: adam@medovina.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: java/5794: gcj fails to verify .class file generated by Sun JDK 1.4 compiler Date: 28 Feb 2002 17:47:43 -0700 >>>>> "Adam" == adam writes: Adam> Number: 5794 Adam> Synopsis: gcj fails to verify .class file generated by Sun JDK 1.4 compiler Could you upload the resulting .class file? Just reply to this email and attach it, keeping gcc-gnats on the CC line. Adam> When Sun's Java compiler in JDK 1.4 compiles a try...finally Adam> block, it emits a (useless and unused) exception table entry Adam> whose target is within the range of protected instructions. Adam> There is nothing inherently unsafe with this, but we check for Adam> this case and reject it in verify.c. It seems to me that this must be invalid. Adam> I tried that and then gcj complained about a stack overflow in Adam> the same .class file. Yeah. Suppose the VM encounters an internal error and throws an exception after it has set the PC to the start of the exception handler but before the first instruction of the handler (probably a pop or an astore) is executed. This leads inexorably to a stack overflow. I imagine the gij verifier will die on this too. I'd like to see the class file though. It's possible there are obscure extenuating circumstances. Or perhaps they've tightened the verification spec and I don't yet know about it. Tom