Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F39811D98 for ; Thu, 24 Apr 2014 14:46:44 +0000 (UTC) Received: (qmail 19007 invoked by uid 500); 24 Apr 2014 14:46:30 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 18753 invoked by uid 500); 24 Apr 2014 14:46:24 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 18476 invoked by uid 99); 24 Apr 2014 14:46:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 14:46:19 +0000 Date: Thu, 24 Apr 2014 14:46:19 +0000 (UTC) From: "Emmanuel Bourg (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (BCEL-29) ReferenceType.getFirstCommonSuperclass: Does not recognize UninitializedObjectType MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BCEL-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bourg updated BCEL-29: ------------------------------- Description: Here's a little gem that causes BCEL's verifier to crash: (Compile the following with the bytecode assembler Jasmin) {code} .class public Test47 .super java/lang/Object .method public foo(B)V .limit stack 10 .limit locals 10 iload_1 ifne ELSE_0 new java/io/BufferedInputStream goto ENDIF_0 ELSE_0: new java/io/FilterInputStream ENDIF_0: pop return .end method {code} The error generated is as follows: {code} Exception in thread "main" org.apache.bcel.verifier.exc.AssertionViolatedException: INTERNAL ERROR: Some RuntimeException occured while verify()ing class 'Test47', method 'public void foo(byte arg1)'. Original RuntimeException's stack trace: --- java.lang.ClassCastException at org.apache.bcel.generic.ReferenceType.getFirstCommonSuperclass(ReferenceType.java:256) at org.apache.bcel.verifier.structurals.OperandStack.merge(OperandStack.java:254) at org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.mergeInFrames(Cont rolFlowGraph.java:246) at org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.execute(ControlFlow Graph.java:189) at org.apache.bcel.verifier.structurals.Pass3bVerifier.circulationPump(Pass3bVerifier.java:228) at org.apache.bcel.verifier.structurals.Pass3bVerifier.do_verify(Pass3bVerifier.java:342) at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:108) at org.apache.bcel.verifier.Verifier.doPass3b(Verifier.java:133) at ClassVerifier.verify(ClassVerifier.java:33) at ClassInfo.verify(ClassInfo.java:51) at Main.main(Main.java:7) --- at org.apache.bcel.verifier.structurals.Pass3bVerifier.do_verify(Pass3bVerifier.java:356) at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:108) at org.apache.bcel.verifier.Verifier.doPass3b(Verifier.java:133) at ClassVerifier.verify(ClassVerifier.java:33) at ClassInfo.verify(ClassInfo.java:51) at Main.main(Main.java:7) {code} It appears that {{ReferenceType.getFirstCommonSuperclass()}} is not designed to handle the org.apache.bcel.verifier.structurals.UninitializedObjectType ReferenceType that is used by BCEL's verifier. was: Here's a little gem that causes BCEL's verifier to crash: (Compile the following with the bytecode assembler Jasmin) .class public Test47 .super java/lang/Object .method public foo(B)V .limit stack 10 .limit locals 10 iload_1 ifne ELSE_0 new java/io/BufferedInputStream goto ENDIF_0 ELSE_0: new java/io/FilterInputStream ENDIF_0: pop return .end method The error generated is as follows: Exception in thread "main" org.apache.bcel.verifier.exc.AssertionViolatedException: INTERNAL ERROR: Some RuntimeException occured while verify()ing class 'Test47', method 'public void foo(byte arg1)'. Original RuntimeException's stack trace: --- java.lang.ClassCastException at org.apache.bcel.generic.ReferenceType.getFirstCommonSuperclass(ReferenceType.java:256) at org.apache.bcel.verifier.structurals.OperandStack.merge(OperandStack.java:254) at org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.mergeInFrames(Cont rolFlowGraph.java:246) at org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.execute(ControlFlow Graph.java:189) at org.apache.bcel.verifier.structurals.Pass3bVerifier.circulationPump(Pass3bVerifier.java:228) at org.apache.bcel.verifier.structurals.Pass3bVerifier.do_verify(Pass3bVerifier.java:342) at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:108) at org.apache.bcel.verifier.Verifier.doPass3b(Verifier.java:133) at ClassVerifier.verify(ClassVerifier.java:33) at ClassInfo.verify(ClassInfo.java:51) at Main.main(Main.java:7) --- at org.apache.bcel.verifier.structurals.Pass3bVerifier.do_verify(Pass3bVerifier.java:356) at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:108) at org.apache.bcel.verifier.Verifier.doPass3b(Verifier.java:133) at ClassVerifier.verify(ClassVerifier.java:33) at ClassInfo.verify(ClassInfo.java:51) at Main.main(Main.java:7) It appears that ReferenceType.getFirstCommonSuperclass() is not designed to handle the org.apache.bcel.verifier.structurals.UninitializedObjectType ReferenceType that is used by BCEL's verifier. Priority: Major Environment: (was: Operating System: All Platform: All) Priority: (was: P4) Severity: (was: normal) > ReferenceType.getFirstCommonSuperclass: Does not recognize UninitializedObjectType > ---------------------------------------------------------------------------------- > > Key: BCEL-29 > URL: https://issues.apache.org/jira/browse/BCEL-29 > Project: Commons BCEL > Issue Type: Bug > Components: Main > Affects Versions: 5.1 > Reporter: David Foster > Assignee: Apache Commons Developers > > Here's a little gem that causes BCEL's verifier to crash: > (Compile the following with the bytecode assembler Jasmin) > {code} > .class public Test47 > .super java/lang/Object > .method public foo(B)V > .limit stack 10 > .limit locals 10 > > iload_1 > ifne ELSE_0 > new java/io/BufferedInputStream > goto ENDIF_0 > ELSE_0: > new java/io/FilterInputStream > ENDIF_0: > pop > > return > .end method > {code} > The error generated is as follows: > {code} > Exception in thread "main" org.apache.bcel.verifier.exc.AssertionViolatedException: INTERNAL > ERROR: Some RuntimeException occured while verify()ing class 'Test47', method 'public void > foo(byte arg1)'. Original RuntimeException's stack trace: > --- > java.lang.ClassCastException > at > org.apache.bcel.generic.ReferenceType.getFirstCommonSuperclass(ReferenceType.java:256) > at org.apache.bcel.verifier.structurals.OperandStack.merge(OperandStack.java:254) > at > org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.mergeInFrames(Cont > rolFlowGraph.java:246) > at > org.apache.bcel.verifier.structurals.ControlFlowGraph$InstructionContextImpl.execute(ControlFlow > Graph.java:189) > at org.apache.bcel.verifier.structurals.Pass3bVerifier.circulationPump(Pass3bVerifier.java:228) > at org.apache.bcel.verifier.structurals.Pass3bVerifier.do_verify(Pass3bVerifier.java:342) > at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:108) > at org.apache.bcel.verifier.Verifier.doPass3b(Verifier.java:133) > at ClassVerifier.verify(ClassVerifier.java:33) > at ClassInfo.verify(ClassInfo.java:51) > at Main.main(Main.java:7) > --- > at org.apache.bcel.verifier.structurals.Pass3bVerifier.do_verify(Pass3bVerifier.java:356) > at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:108) > at org.apache.bcel.verifier.Verifier.doPass3b(Verifier.java:133) > at ClassVerifier.verify(ClassVerifier.java:33) > at ClassInfo.verify(ClassInfo.java:51) > at Main.main(Main.java:7) > {code} > It appears that {{ReferenceType.getFirstCommonSuperclass()}} is not designed to handle the org.apache.bcel.verifier.structurals.UninitializedObjectType ReferenceType that is used by BCEL's verifier. -- This message was sent by Atlassian JIRA (v6.2#6252)