Problems with too large methods
Nikita Salnikov-Tarnovski <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi.
I do some byte code modifications with ASM 3.3.1. I use CheckClassAdapter to verify my modified code as follows:
ClassReader cr = new ClassReader(originalBytes);
ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);
CheckClassAdapter checkClassAdapter = new CheckClassAdapter(cw);
ClassAdapter adapter = new MyClassAdapter(checkClassAdapter);
cr.accept(adapter, 0);
return cw.toByteArray();
On some occasion, when original method is big enough, my modified code becomes too large and executing it I get
Exception in thread "main" java.lang.ClassFormatError: Invalid method Code length 65554 in class file
The question is:
Why CheckClassAdapter does not detect this violation ?
Best regards
Nikem
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws