Skip to content

Commit 48914be

Browse files
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 ce9f046 commit 48914be

File tree

2 files changed

+379
-78
lines changed

2 files changed

+379
-78
lines changed

0 commit comments

Comments
 (0)