Hi,
Am 18.06.2011 um 20:43 schrieb stephane ducasse stephane.ducasse@gmail.com:
As a note, the Java VM and the Flash VM, at least, have strong bytecode verifiers specifically for security reasons.
do they verify at execution time and cache?
verification takes place at load time, for all classes as they are loaded. Not afterwards. Also, keep in mind that Java's type system allows some guarantees once code is verified. (What do you mean by "cache"?)
I checked a while ago but there were essentially checking that the stack was balanced... but it was long time ago.
They do a lot more than that. :-)
Check the spec: http://java.sun.com/docs/books/jvms/second_edition/html/ConstantPool.doc.htm... http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#4... http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#8...
Especially the second link is worthwhile.
Best,
Michael