Bug 43391

Summary: ARRAYLENGTH incorrectly not StackConsumer
Product: BCEL - Now in Jira Reporter: Zappacky <zappacky>
Component: MainAssignee: issues <issues>
Status: RESOLVED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P3    
Version: 5.3   
Target Milestone: ---   
Hardware: All   
OS: All   

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