Urgent: java.lang.ClassFormatError: bad constant pool entry tag

845 views
Skip to first unread message

Suvam Mukherjee

unread,
Jul 22, 2015, 2:49:51 PM7/22/15
to chord-discuss
Hi,
I am implementing my analysis in Chord, but am stuck with a strange, persistent problem. I would really appreciate some help with this, as I have spent over a day on this, and haven't been able to find a fix. 

Running any analysis in Chord, including the predefined ones, is leading to the following error:
java.lang.ClassFormatError: bad constant pool entry tag

I am unable to even print the quadcode representation of a simple Java class. Here are some steps to reproduce the problem. I am creating a Java Project in Eclipse. I am creating a project "test", in which I am creating the following simple Java code:

package test;


public class HelloWorld {


public static void main(String[] args) {

// TODO Auto-generated method stub

System.out.println("\nHello World!");


}


}


The source file is under src, the class file is under bin. I am writing the chord.properties file accordingly.
The program is compiling fine, and executing. However, when I try to pretty print the quadcode representation, I get the following error in the log file:

Chord run initiated at: 23 Jul, 2015 12:12:04 AM

java.lang.ClassFormatError: bad constant pool entry tag (entry=15, tag=18

        at joeq.Class.jq_ConstantPool.load(jq_ConstantPool.java:82)

        at joeq.Class.jq_Class.load(jq_Class.java:869)

        at joeq.Class.jq_Class.load(jq_Class.java:826)

        at joeq.Class.jq_Class.verify(jq_Class.java:2101)

        at joeq.Class.jq_Class.prepare(jq_Class.java:2126)

        at joeq.Class.jq_Class.prepare(jq_Class.java:2274)

        at joeq.Class.jq_Class.prepare(jq_Class.java:2274)

        at joeq.Compiler.CompilationState$StaticCompilation.needsDynamicLink(CompilationState.java:73)

        at joeq.Compiler.Quad.BytecodeToQuad.visitIINVOKE(BytecodeToQuad.java:1653)

        at joeq.Compiler.BytecodeAnalysis.BytecodeVisitor.visitBytecode(BytecodeVisitor.java:1078)

        at joeq.Compiler.Quad.BytecodeToQuad.traverseBB(BytecodeToQuad.java:242)

        at joeq.Compiler.Quad.BytecodeToQuad.convert(BytecodeToQuad.java:191)

        at joeq.Compiler.Quad.CodeCache._get(CodeCache.java:62)

        at joeq.Compiler.Quad.CodeCache.getCode(CodeCache.java:37)

        at joeq.Class.jq_Method.getCFG(jq_Method.java:571)

        at chord.program.RTA.processMethod(RTA.java:359)

        at chord.program.RTA.build(RTA.java:221)

        at chord.program.RTA.getMethods(RTA.java:144)...


I have attached the full error log file with this mail (log.txt). I have set the chord.properties file properly. The strange thing is only a few days back, Chord was running fine. I could run the cipa-0cfa-dlog analysis perfectly. Now I keep getting this error. I would really appreciate some help with this, as I have a deadline to meet.


Thanks a lot in advance!



Sincerely,

Suvam.


Programming Languages Lab,

Computer Science and Automation,

Indian Institute of Science, Bangalore, India.

log.txt

Suvam Mukherjee

unread,
Jul 22, 2015, 2:58:38 PM7/22/15
to chord-discuss
I should add that I am using Mac OS X Yosemite and Java 1.8.0_45.

Ravi Mangal

unread,
Jul 22, 2015, 3:04:13 PM7/22/15
to chord-...@googlegroups.com
The issue is most likely due to the use of Java 8. The front-end used by jChord (i.e. joeq) only supports through Java 6 though it is also capable of parsing Java 7 class files, I think. Basically, I would suggest compiling the program you are trying to analyze using Java 6 or Java 7, and you should not see this issue.

--
You received this message because you are subscribed to the Google Groups "chord-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chord-discus...@googlegroups.com.
To post to this group, send email to chord-...@googlegroups.com.
Visit this group at http://groups.google.com/group/chord-discuss.
For more options, visit https://groups.google.com/d/optout.

Suvam Mukherjee

unread,
Jul 22, 2015, 3:30:23 PM7/22/15
to chord-...@googlegroups.com
Hi Ravi,

Thanks a lot for the help! I'll try to run this with Java 7, and report back. 


Sincerely,
Suvam. 

Programming Languages Lab,
Computer Science and Automation,
Indian Institute of Science, Bangalore, India.

--
You received this message because you are subscribed to a topic in the Google Groups "chord-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chord-discuss/h24DrzUGfJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chord-discus...@googlegroups.com.

Suvam Mukherjee

unread,
Jul 23, 2015, 10:49:59 PM7/23/15
to chord-discuss, suvamth...@gmail.com
Downgrading to Java 7 resolved the issue. Thanks a lot Ravi!

Sincerely,

Suvam.


Programming Languages Lab,

Computer Science and Automation,

Indian Institute of Science, Bangalore, India.


On Thursday, July 23, 2015 at 12:19:51 AM UTC+5:30, Suvam Mukherjee wrote:
Reply all
Reply to author
Forward
0 new messages