This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: verifier error


>>>>> "Nic" == Nic Ferrier <nferrier@tapsellferrier.co.uk> writes:

Nic> fatal error: verification failed at PC 6 
Nic> in javax.servlet.http.HttpServlet:testConditional
Nic>         ((Ljavax.servlet.http.HttpServletRequest;
Nic>           Ljavax.servlet.http.HttpServletResponse;)Z):
Nic>                  wrong argument count for invokeinterface

Nic> Otherwise I'll try and get a little bit of debug... I'm not
Nic> entirely sure what to give though.

Use `jcf-dump -c javax.servlet.http.HttpServlet' to look at the
bytecode for the method in question.  Find the invokeinterface
instruction at PC 6 and find the signature of the method it is
calling.

Step 2, unfortunately, is harder.  The `invokeinterface' instruction
takes a byte (the byte at <loc>+3, where <loc> is the location of the
invokeinterface opcode).  This byte is the number of arguments to the
method, plus one.  One way to do this would be to look at the .class
file in a hex editor; I don't think jcf-dump will print this byte.

This particular error is a pedantic one (this particular byte holds
redundant information, and I think we just ignore it when
interpreting), but I think it is required by the JVMS.

If you'd like to email me the .class file I will take a look at it.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]