| Summary: | [newindex] IndexOutOfBoundsException in ClassFileToIndexConverter.addMethod | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Igor Fedorenko <igor> | ||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | stephan.herrmann | ||||
| Version: | 4.8 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Igor Fedorenko
Let's look at the full output from javap -p -v -c:
public void borked(java.util.ArrayList<java.lang.Object>);
descriptor: ()V
flags: ACC_PUBLIC
Code:
stack=0, locals=1, args_size=1
0: return
LineNumberTable:
line 4: 0
LocalVariableTable:
Start Length Slot Name Signature
0 1 0 this Ltest/Borked;
Signature: #13 // (Ljava/util/ArrayList<Ljava/lang/Object;>;)V
The descriptor must be trusted, so you expect us to treat the method as argument-less despite the signature, right?
I'd be surprised, however, if the indexer were the only piece of software that explodes on such byte code.
Out of curiosity: how was the class file produced?
(In reply to Stephan Herrmann from comment #1) > > The descriptor must be trusted, so you expect us to treat the method as > argument-less despite the signature, right? I expect the new indexer to either use the method descriptor, which is what JVM is using, or skip indexing the method/class as malformed. > I'd be surprised, however, if the indexer were the only piece of software > that explodes on such byte code. Surprisingly enough, exception for the new indexer everything else works without problems, both in development and in production. And it's not just Eclipse, IntelliJ works and so do many command line tools that read/manipulate class files (I work in a large dev org and we use variety of tools). > Out of curiosity: how was the class file produced? The attached "Borked" class was creating using ASM library. In our real codebase the problem is observed in an obfuscated thirdparty library where several of libriry's internal classes have method description/signature mismatch. I don't know if the mismatch is deliberate attempt to confuse decompilers or a bug in the obfuscator. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |