How does the JVM Classfile Verifier work?

How does the JVM class verifier perform class validation?

Can someone tell me the steps?

+3
source share
2 answers

Four passes passed:

  • Checking the main format (when the class is loaded) - (magic number, checking the pool of constants).

  • Additional check (when linking) - check the final modifiers, check for direct subclasses, valid fields, check the constant pool.

  • Checking the byte code (when linking) - check the code array - the operand stack is good, local variables, the correct method call, field assignment, etc.

  • ( ) - / .

. 4.9.1

http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html

+7

. 4.9 VM. .

+3

Source: https://habr.com/ru/post/1708951/


All Articles