Commit 07420e7
committed
Modifies the instrumented clinit_wrapper function
The previous version of clinit_wrapper did not conform to the JVM
specification (section 5.5) as it did not support concurrency. More
specifically, the clinit_wrapper has to be carefully synchronised
as other threads may try to initialize a given class or interface
at the same-time.
This commit makes the clinit_wrapper thread-safe by introducing a
critical section and two state variables. The commit implements a
simplification of the algorithm defined in section 5.5 of the JVM
specification. For instance, exceptions thrown during the execution
of static initializers are not properly handled.1 parent e0bc5fd commit 07420e7
File tree
2 files changed
+379
-78
lines changed- src/java_bytecode
2 files changed
+379
-78
lines changed
0 commit comments