commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Burka (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (BCEL-290) Verifier reports 'Constant pool at index 0 is null' for invokedynamic
Date Fri, 09 Jun 2017 17:24:18 GMT

     [ https://issues.apache.org/jira/browse/BCEL-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Peter Burka resolved BCEL-290.
------------------------------
    Resolution: Duplicate

> Verifier reports 'Constant pool at index 0 is null' for invokedynamic
> ---------------------------------------------------------------------
>
>                 Key: BCEL-290
>                 URL: https://issues.apache.org/jira/browse/BCEL-290
>             Project: Commons BCEL
>          Issue Type: Bug
>    Affects Versions: 6.0
>            Reporter: Peter Burka
>
> When the BCEL Verifier encounters an invokedynamic bytecode (such as those generated
by javac for lambdas), it throws a org.apache.bcel.classfile.ClassFormatException in Pass3a
reporting that "Constant pool at index 0 is null."
> Test case:
> {noformat}
> public class Bug3 {
>     public Runnable foo() {
> 	return () -> {};
>     }
> }
> {noformat}
> Output:
> {noformat}
> JustIce by Enver Haase, (C) 2001-2002.
> <http://bcel.sourceforge.net>
> <http://commons.apache.org/bcel>
> Now verifying: Bug3
> Pass 1:
> VERIFIED_OK
> Passed verification.
> Pass 2:
> VERIFIED_OK
> Passed verification.
> Pass 3a, method number 0 ['public void <init>()']:
> VERIFIED_OK
> Passed verification.
> Pass 3b, method number 0 ['public void <init>()']:
> VERIFIED_OK
> Passed verification.
> Exception in thread "main" org.apache.bcel.classfile.ClassFormatException: Constant pool
at index 0 is null.
> 	at org.apache.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:258)
> 	at org.apache.bcel.classfile.ConstantPool.getConstantString(ConstantPool.java:293)
> 	at org.apache.bcel.generic.FieldOrMethod.getReferenceType(FieldOrMethod.java:116)
> 	at org.apache.bcel.generic.FieldOrMethod.getLoadClassType(FieldOrMethod.java:133)
> 	at org.apache.bcel.verifier.statics.Pass3aVerifier$InstOperandConstraintVisitor.visitLoadClass(Pass3aVerifier.java:521)
> 	at org.apache.bcel.generic.INVOKEDYNAMIC.accept(INVOKEDYNAMIC.java:114)
> 	at org.apache.bcel.generic.InstructionHandle.accept(InstructionHandle.java:302)
> 	at org.apache.bcel.verifier.statics.Pass3aVerifier.pass3StaticInstructionOperandsChecks(Pass3aVerifier.java:443)
> 	at org.apache.bcel.verifier.statics.Pass3aVerifier.do_verify(Pass3aVerifier.java:208)
> 	at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:71)
> 	at org.apache.bcel.verifier.Verifier.doPass3a(Verifier.java:89)
> 	at org.apache.bcel.verifier.Verifier.main(Verifier.java:216)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message