From 1fce64ddc7c0a97479bc89b8e310a288c1fb8468 Mon Sep 17 00:00:00 2001 From: duke Date: Fri, 31 Oct 2025 10:56:02 +0000 Subject: [PATCH] Backport 2300a212dd135f1f01604c5c2915653a3f3bd869 --- .../RawMonitorEnter/rawmonenter003/TestDescription.java | 5 ++++- .../jvmti/RawMonitorExit/rawmonexit003/TestDescription.java | 5 ++++- .../RawMonitorNotify/rawmnntfy003/TestDescription.java | 5 ++++- .../rawmnntfyall003/TestDescription.java | 5 ++++- .../jvmti/RawMonitorWait/rawmnwait003/TestDescription.java | 5 ++++- .../nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp | 6 +----- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java index 3120d355679..e743efe83cb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmonenter003 nsk.jvmti.RawMonitorEnter.rawmonenter003 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java index d7feb765293..5d0753e95f2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmonexit003 nsk.jvmti.RawMonitorExit.rawmonexit003 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java index a95d3da890f..d83f338a49f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmnntfy003 nsk.jvmti.RawMonitorNotify.rawmnntfy003 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java index 2f706b0c299..8c5fd95ea86 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmnntfyall003 nsk.jvmti.RawMonitorNotifyAll.rawmnntfyall003 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java index 8291f168ada..aab0b8d9e21 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,9 @@ * 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid * Ported from JVMDI. * + * @comment The test intentionally passes a bad argument to the function to verify error checking, + which causes a false positive from the ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run main/othervm/native -agentlib:rawmnwait003 nsk.jvmti.RawMonitorWait.rawmnwait003 diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp index 86d5f5de9f7..9a402a17eda 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -237,10 +237,6 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { } jvmti->RawMonitorExit(syncLock); - - if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock))) - nsk_jvmti_setFailStatus(); - } /* ============================================================================= */