summaryrefslogtreecommitdiff
path: root/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch')
-rw-r--r--dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch b/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch
new file mode 100644
index 0000000..5d5b8a7
--- /dev/null
+++ b/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch
@@ -0,0 +1,68 @@
+From b91f42fc90179585c3e2a9866e93a3168b1ada9d Mon Sep 17 00:00:00 2001
+From: Graham Chapman <graham_chapman@ca.ibm.com>
+Date: Sat, 25 Jul 2020 16:13:13 -0400
+Subject: [PATCH] Make JVMTI test variables static
+
+Two tests declare the same named global non-statically which breaks some
+newer compilers.
+
+Fixes: #10252
+
+[ci skip]
+
+Signed-off-by: Graham Chapman <graham_chapman@ca.ibm.com>
+---
+ .../src/com/ibm/jvmti/tests/traceSubscription/ts001.c | 4 ++--
+ .../jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c
+index 97843fc7c7..2c1e1ae67f 100644
+--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c
++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2001, 2018 IBM Corp. and others
++ * Copyright (c) 2001, 2020 IBM Corp. and others
+ *
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which accompanies this
+@@ -35,7 +35,7 @@ static jvmtiExtensionFunction subscribe = NULL;
+ static jvmtiExtensionFunction unsubscribe = NULL;
+ static jvmtiExtensionFunction flush = NULL;
+ static jvmtiExtensionFunction metadata = NULL;
+-void *subscriptionID;
++static void *subscriptionID;
+ volatile static jint bufferCount = 0;
+ volatile static jint bufferCountFinal = 0;
+ volatile static int completed = 0;
+diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c
+index 2fda9e8bd7..f1601298af 100644
+--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c
++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c
+@@ -1,5 +1,5 @@
+ /*******************************************************************************
+- * Copyright (c) 2001, 2018 IBM Corp. and others
++ * Copyright (c) 2001, 2020 IBM Corp. and others
+ *
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which accompanies this
+@@ -31,15 +31,15 @@ static agentEnv * env;
+ static jvmtiExtensionFunction subscribe = NULL;
+ static jvmtiExtensionFunction unsubscribe = NULL;
+
+-void *subscriptionID;
++static void *subscriptionID;
+ volatile static jint bufferCount = 0;
+ volatile static int alarmed = 0;
+
+-void *subscriptionID2;
++static void *subscriptionID2;
+ volatile static jint bufferCount2 = 0;
+ volatile static int alarmed2 = 0;
+
+-void *subscriptionID3;
++static void *subscriptionID3;
+ volatile static jint bufferCount3 = 0;
+ volatile static int alarmed3 = 0;
+