Skip to content

Commit 2300a21

Browse files
author
Alex Menkov
committed
8358679: [asan] vmTestbase/nsk/jvmti tests show memory issues
Reviewed-by: cjplummer, sspitsyn
1 parent 3d74cbe commit 2300a21

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed

test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorEnter/rawmonenter003/TestDescription.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
3737
* 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid
3838
* Ported from JVMDI.
3939
*
40+
* @comment The test intentionally passes a bad argument to the function to verify error checking,
41+
which causes a false positive from the ASAN lib
42+
* @requires !vm.asan
4043
* @library /vmTestbase
4144
* /test/lib
4245
* @run main/othervm/native -agentlib:rawmonenter003 nsk.jvmti.RawMonitorEnter.rawmonenter003

test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorExit/rawmonexit003/TestDescription.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
3737
* 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid
3838
* Ported from JVMDI.
3939
*
40+
* @comment The test intentionally passes a bad argument to the function to verify error checking,
41+
which causes a false positive from the ASAN lib
42+
* @requires !vm.asan
4043
* @library /vmTestbase
4144
* /test/lib
4245
* @run main/othervm/native -agentlib:rawmonexit003 nsk.jvmti.RawMonitorExit.rawmonexit003

test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotify/rawmnntfy003/TestDescription.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
3737
* 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid
3838
* Ported from JVMDI.
3939
*
40+
* @comment The test intentionally passes a bad argument to the function to verify error checking,
41+
which causes a false positive from the ASAN lib
42+
* @requires !vm.asan
4043
* @library /vmTestbase
4144
* /test/lib
4245
* @run main/othervm/native -agentlib:rawmnntfy003 nsk.jvmti.RawMonitorNotify.rawmnntfy003

test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorNotifyAll/rawmnntfyall003/TestDescription.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
3737
* 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid
3838
* Ported from JVMDI.
3939
*
40+
* @comment The test intentionally passes a bad argument to the function to verify error checking,
41+
which causes a false positive from the ASAN lib
42+
* @requires !vm.asan
4043
* @library /vmTestbase
4144
* /test/lib
4245
* @run main/othervm/native -agentlib:rawmnntfyall003 nsk.jvmti.RawMonitorNotifyAll.rawmnntfyall003

test/hotspot/jtreg/vmTestbase/nsk/jvmti/RawMonitorWait/rawmnwait003/TestDescription.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
3737
* 4431533: TEST_BUG: destroyed raw monitor can be occasionally valid
3838
* Ported from JVMDI.
3939
*
40+
* @comment The test intentionally passes a bad argument to the function to verify error checking,
41+
which causes a false positive from the ASAN lib
42+
* @requires !vm.asan
4043
* @library /vmTestbase
4144
* /test/lib
4245
* @run main/othervm/native -agentlib:rawmnwait003 nsk.jvmti.RawMonitorWait.rawmnwait003

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/em07t002.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2004, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -237,10 +237,6 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
237237
}
238238

239239
jvmti->RawMonitorExit(syncLock);
240-
241-
if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
242-
nsk_jvmti_setFailStatus();
243-
244240
}
245241

246242
/* ============================================================================= */

0 commit comments

Comments
 (0)