JDK 21 |
---|
21Resolved |
Duplicate :
|
Running the JVM with `-XX:+UseZGC` and non-default value of `-XX:ObjectAlignmentInBytes` may lead to JVM crashes or incorrect execution. The issue is caused by an incorrect JIT compiler optimization of the `java.lang.Object.clone()` method for this configuration. If using ZGC with a non-default value of `ObjectAlignmentInBytes` is desired, JIT compilation of `java.lang.Object.clone()` can be disabled using the command-line options `-XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_clone`.
|