JDK-8257027 added a diagnostic option to check for synchronization on value-based classes. Zero does not support it, so it would fail the relevant test:
$ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/Monitor/SyncOnValueBasedClassTest.java
STDERR:
stdout: [];
stderr: [Exception in thread "main" java.lang.RuntimeException: synchronization on value based class did not fail
at SyncOnValueBasedClassTest$FatalTest.main(SyncOnValueBasedClassTest.java:128)
]
exitValue = 1
java.lang.RuntimeException: 'fatal error: Synchronizing on object' missing from stdout/stderr
Template interpreters implement this check by going to to slowpath that calls InterpreterRuntime::monitorenter. Zero already goes to that path when UseHeavyMonitors is enabled, so we might just enable it when lock diagnostics is requested. This would cost us zero (pun intended) when diagnostic option is disabled.