Bug 43391 - ARRAYLENGTH incorrectly not StackConsumer
Summary: ARRAYLENGTH incorrectly not StackConsumer
Status: RESOLVED FIXED
Alias: None
Product: BCEL - Now in Jira
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.3
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: issues@commons.apache.org
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2007-09-13 16:03 UTC by Zappacky
Modified: 2008-02-02 13:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zappacky 2007-09-13 16:03:06 UTC
According to the JVM Instruction Set, ARRAYLENGTH pops a value from the stack
and pushes a value to the stack. In BCEL, it only implements StackProducer, so
it creates an incorrectly high stack height. The Constants class already has the
correct value for it, but since the instruction does not implement StackConsumer
it is never used. The easiest solution is to change
src\java\src\java\org\apache\bcel\generic\ARRAYLENGTH.java to implement
StackConsumer. This will fix the bug.

I didn't attach a patch for this because the change is so tiny.
Comment 1 Torsten Curdt 2008-02-02 13:10:03 UTC
Thanks! Applied ...please cross check