Java byte-code verification: when, how, or maybe to turn it off?

День 2 /  / Зал 3  /  RU / Hardcore. Really hard and demanding talk, you'll understand only if you're an experienced engineer.

Today's Java developers are increasingly relying on libraries that generate Java byte-code at run time to effectively implement various tricks that are hard or impossible to do in Java. However, while the javac compiler is guaranteed to produce correct Java byte-code, shifting down to the byte-code level requires that you keep track of its correctness yourself. Otherwise, there is a chance to get a j.l.VerifyError at run time upon the loading of a generated class, because the JVM passes all classes through the Java byte-code verifier to enforce strict correctness requirements. Therefore, knowing just the semantics of Java byte-code instructions is often not enough to properly synthesize classes — you also need to know how the Java byte-code verifier works, what byte-code it deems correct, and what it does not.

In this talk, Nikita will tell what mission the Java byte-code verifier carries out in the JVM, when and how it works, whether it may affect the performance of your application, and why it turning it off is so dangerous.

Download presentation
Nikita Lipsky
Excelsior LLC

Nikita is an initiator and a product lead of Excelsior JET project — certified Java SE implementation with AOT compiler developed by Excelsior LLC. Working on the project since 1997 he took part in almost every activity of the project from the JVM core to product management and support. In particular, he is an author of OSGi support at the JVM level in Excelsior JET, Java Runtime Slim-down technology — Java SE modularization implemented in Excelsior JET since 2007, both Java bytecode verifiers and many others.