Skip to main content

preverify tool on amd64

4 replies [Last post]
Joined: 2007-09-20


I tried to execute the preverify tool (intel x86 linux executable) on my amd64 machine but it didn't run at all. Can anyone please tell me how I can execute preverify on amd64 machine running linux?

Thank you.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-11-25

Wouldn't it be easier to port the verifier to java??

Joined: 2007-09-20

Got over the Bad magic number error -
Need to change the get4bytes function in classloader.c. We need to do explicit cast to unsigned long before shifting bits. Since unsigned long on amd64 is 8 bytes long the bit shifting was causing sign extension and hence the magic number check was failing.

Unfortunately the errors are still not over :(

VERIFIER ERROR javax/microedition/lcdui/Canvas.allowKey(I)Z:
Code stops in the middle of instruction starting at offset 14

I guess a lot more porting is required for the 64bit platform.

Joined: 2006-09-25

You can try build preverifier for your platform from sources.
Checkout the sources from,
go to build/linux and run 'make all'.
Please let me know if it works.

Joined: 2007-09-20

Hi danila,

Thanks for the quick reply.

I compiled the preverify executable on my amd64 machine - now atleast the executable runs on my machine!
But the preverify exe is still unable to preverify the classes -
Unexpected CRC value
Error preverifying class java.lang.Object
Class loading error: Bad magic number

I have successfully preverified these classes on windows & ubuntu (intel32 platform)

Any idea why this is happening?

Thank you.