On Thu, 17 Sep 2026 22:53:09 GMT, David Holmes <[email protected]> wrote:
>> src/hotspot/share/prims/whitebox.cpp line 1364: >> >>> 1362: WB_ENTRY(jboolean, WB_IsLockedVMFlag(JNIEnv* env, jobject o, jstring >>> name)) >>> 1363: const JVMFlag* flag = getVMFlag(thread, env, name); >>> 1364: return (flag != nullptr) && flag->is_unlocked(); >> >> Suggestion: >> >> return (flag != nullptr) && !flag->is_unlocked(); >> >> This code is wrong. > > BTW this WB function seems unused but there is a test for it: > `./lib-test/jdk/test/whitebox/vm_flags/VmFlagTest.java` Yes, good catch! I've corrected the check and added a new test to cover `WB_IsLockedVMFlag` and ensure `UnlockDiagnosticVMOptions` and `UnlockExperimentalVMOptions` are always treated as unlocked. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32910#discussion_r4047754400
