commons-issues mailing list archives

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

             Summary: Verifier reports 'Constant pool at index 0 is null' for invokedynamic
                 Key: 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:
public class Bug3 {
    public Runnable foo() {
	return () -> {};

JustIce by Enver Haase, (C) 2001-2002.

Now verifying: Bug3

Pass 1:
Passed verification.

Pass 2:
Passed verification.

Pass 3a, method number 0 ['public void <init>()']:
Passed verification.

Pass 3b, method number 0 ['public void <init>()']:
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(
	at org.apache.bcel.classfile.ConstantPool.getConstantString(
	at org.apache.bcel.generic.FieldOrMethod.getReferenceType(
	at org.apache.bcel.generic.FieldOrMethod.getLoadClassType(
	at org.apache.bcel.verifier.statics.Pass3aVerifier$InstOperandConstraintVisitor.visitLoadClass(
	at org.apache.bcel.generic.INVOKEDYNAMIC.accept(
	at org.apache.bcel.generic.InstructionHandle.accept(
	at org.apache.bcel.verifier.statics.Pass3aVerifier.pass3StaticInstructionOperandsChecks(
	at org.apache.bcel.verifier.statics.Pass3aVerifier.do_verify(
	at org.apache.bcel.verifier.PassVerifier.verify(
	at org.apache.bcel.verifier.Verifier.doPass3a(
	at org.apache.bcel.verifier.Verifier.main(

This message was sent by Atlassian JIRA

View raw message