summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2019-12-30 15:35:59 +0100
committerRichard Leitner <richard.leitner@skidata.com>2020-01-27 11:02:06 +0100
commitcb6eedeb1f7fa877497e6ff2aa893e8089fe6541 (patch)
treeba4b6977735e331c5cb6a7585a185fba895f2dc7 /recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch
parent19b569281cc30e3aa94e772d6885cd340b1d1724 (diff)
downloadmeta-java-cb6eedeb1f7fa877497e6ff2aa893e8089fe6541.tar.gz
openjdk-8: update to latest ga version 242
As OpenJDK-8 is now tagging "ga" versions in addition to the "build" version the recipes are adapted to use those "ga" versions. All existing patches got re-applied and renamed. For better handling Hotspot patches now start at patch number 1001 and jdk patches at 2001. Furthermore architecture dependent patches are prefixed with the architecture they apply on. Following patches/hunks were completely dropped: - 0002-hotspot-fix-compilation-with-security-flags-enabled.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/c40a28e54185 - 0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch ostream.cpp:112 got fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f3108e56b502 - 0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916 - 0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/32bc598624bd - 0020-Enable-HotSpot-builds-on-5.x-Linux-kernels.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/5af8ec63c21c - openjdk8-add-missing-linker-flags.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f175513c2c3a - openjdk8-fix-shark-stdc++11.patch fixed in hotspot jdk8u - openjdk8-fix-libpng-neon-build.patch fixed in jdk https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5d57817931e1 - aarch64-hotspot-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u Following patches were newly added: - 0011-autoconf-fix-CC-with-arguments-detection.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" - 0012-autoconf-NativeCompilation-remove-sysroot.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch235
1 files changed, 235 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch b/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch
new file mode 100644
index 0000000..10dd0f7
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/1008-hotspot-Turn-on-the-Wreturn-type-warning.patch
@@ -0,0 +1,235 @@
1From 2cce90259f9de7b5fba7f3380cdc90b3a586aa75 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 16:48:32 +0100
4Subject: [PATCH 1008/1012] hotspot: Turn on the -Wreturn-type warning
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9|# HG changeset patch
10|# User stefank
11|# Date 1525453613 -3600
12|# Fri May 04 18:06:53 2018 +0100
13|# Node ID 07a1135a327362f157955d470fad5df07cc35164
14|# Parent de79964656fc652f2085dac4fe99bcc128b5a3b1
158062808, PR3548: Turn on the -Wreturn-type warning
16Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett
17
18Upstream-Status: Backport
19
20Signed-off-by: André Draszik <andre.draszik@jci.com>
21Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
22---
23 make/linux/makefiles/gcc.make | 2 +-
24 src/cpu/x86/vm/x86_32.ad | 1 +
25 src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 1 +
26 src/share/vm/classfile/defaultMethods.cpp | 4 ++--
27 src/share/vm/classfile/symbolTable.cpp | 4 ++--
28 src/share/vm/classfile/systemDictionary.cpp | 6 +++---
29 src/share/vm/memory/heapInspection.hpp | 2 +-
30 src/share/vm/memory/metaspaceShared.hpp | 2 +-
31 src/share/vm/oops/constantPool.hpp | 2 +-
32 src/share/vm/prims/jvm.cpp | 2 +-
33 src/share/vm/runtime/reflection.cpp | 2 +-
34 src/share/vm/runtime/sharedRuntime.cpp | 2 +-
35 src/share/vm/services/memTracker.hpp | 2 +-
36 13 files changed, 17 insertions(+), 15 deletions(-)
37
38diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make
39index 36b3c8ba9..cd9511e50 100644
40--- a/hotspot/make/linux/makefiles/gcc.make
41+++ b/hotspot/make/linux/makefiles/gcc.make
42@@ -211,7 +211,7 @@ ifeq ($(USE_CLANG), true)
43 WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
44 endif
45
46-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
47+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
48
49 ifeq ($(USE_CLANG),)
50 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
51diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad
52index f42d1a288..c8f4ee161 100644
53--- a/hotspot/src/cpu/x86/vm/x86_32.ad
54+++ b/hotspot/src/cpu/x86/vm/x86_32.ad
55@@ -1250,6 +1250,7 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
56
57
58 Unimplemented();
59+ return 0; // Mute compiler
60 }
61
62 #ifndef PRODUCT
63diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
64index 1a7375afc..fbf51b040 100644
65--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
66+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
67@@ -541,6 +541,7 @@ JVM_handle_linux_signal(int sig,
68 err.report_and_die();
69
70 ShouldNotReachHere();
71+ return true; // Mute compiler
72 }
73
74 void os::Linux::init_thread_fpu_state(void) {
75diff --git a/hotspot/src/share/vm/classfile/defaultMethods.cpp b/hotspot/src/share/vm/classfile/defaultMethods.cpp
76index 4b4b4e250..196622aed 100644
77--- a/hotspot/src/share/vm/classfile/defaultMethods.cpp
78+++ b/hotspot/src/share/vm/classfile/defaultMethods.cpp
79@@ -506,7 +506,7 @@ Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method
80 ss.write((const char*)name->bytes(), name->utf8_length());
81 ss.write((const char*)signature->bytes(), signature->utf8_length());
82 ss.print(" is abstract");
83- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
84+ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
85 }
86
87 Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
88@@ -521,7 +521,7 @@ Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods
89 ss.print(".");
90 ss.write((const char*)name->bytes(), name->utf8_length());
91 }
92- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
93+ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
94 }
95
96
97diff --git a/hotspot/src/share/vm/classfile/symbolTable.cpp b/hotspot/src/share/vm/classfile/symbolTable.cpp
98index ec97077b7..2621a7d62 100644
99--- a/hotspot/src/share/vm/classfile/symbolTable.cpp
100+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp
101@@ -249,7 +249,7 @@ Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) {
102 MutexLocker ml(SymbolTable_lock, THREAD);
103
104 // Otherwise, add to symbol to table
105- return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
106+ return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
107 }
108
109 Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
110@@ -288,7 +288,7 @@ Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
111 // Grab SymbolTable_lock first.
112 MutexLocker ml(SymbolTable_lock, THREAD);
113
114- return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
115+ return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
116 }
117
118 Symbol* SymbolTable::lookup_only(const char* name, int len,
119diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
120index da2717d36..5253afc22 100644
121--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
122+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
123@@ -229,15 +229,15 @@ Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader
124 class_name->as_C_string(),
125 class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
126 if (FieldType::is_array(class_name)) {
127- return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
128+ return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
129 } else if (FieldType::is_obj(class_name)) {
130 ResourceMark rm(THREAD);
131 // Ignore wrapping L and ;.
132 TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
133 class_name->utf8_length() - 2, CHECK_NULL);
134- return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
135+ return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
136 } else {
137- return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
138+ return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
139 }
140 }
141
142diff --git a/hotspot/src/share/vm/memory/heapInspection.hpp b/hotspot/src/share/vm/memory/heapInspection.hpp
143index 09ee6602e..c5fec15c3 100644
144--- a/hotspot/src/share/vm/memory/heapInspection.hpp
145+++ b/hotspot/src/share/vm/memory/heapInspection.hpp
146@@ -367,7 +367,7 @@ class HeapInspection : public StackObj {
147 _csv_format(csv_format), _print_help(print_help),
148 _print_class_stats(print_class_stats), _columns(columns) {}
149 void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
150- size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
151+ size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
152 static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
153 private:
154 void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
155diff --git a/hotspot/src/share/vm/memory/metaspaceShared.hpp b/hotspot/src/share/vm/memory/metaspaceShared.hpp
156index 2f3abae6a..d58ebecb2 100644
157--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp
158+++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp
159@@ -93,7 +93,7 @@ class MetaspaceShared : AllStatic {
160 static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
161 static int preload_and_dump(const char * class_list_path,
162 GrowableArray<Klass*>* class_promote_order,
163- TRAPS) NOT_CDS_RETURN;
164+ TRAPS) NOT_CDS_RETURN_(0);
165
166 static ReservedSpace* shared_rs() {
167 CDS_ONLY(return _shared_rs);
168diff --git a/hotspot/src/share/vm/oops/constantPool.hpp b/hotspot/src/share/vm/oops/constantPool.hpp
169index 0698eb40e..354293924 100644
170--- a/hotspot/src/share/vm/oops/constantPool.hpp
171+++ b/hotspot/src/share/vm/oops/constantPool.hpp
172@@ -350,7 +350,7 @@ class ConstantPool : public Metadata {
173
174 Klass* klass_at(int which, TRAPS) {
175 constantPoolHandle h_this(THREAD, this);
176- return klass_at_impl(h_this, which, CHECK_NULL);
177+ return klass_at_impl(h_this, which, THREAD);
178 }
179
180 Symbol* klass_name_at(int which); // Returns the name, w/o resolving.
181diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
182index 8d7523c55..4034a8589 100644
183--- a/hotspot/src/share/vm/prims/jvm.cpp
184+++ b/hotspot/src/share/vm/prims/jvm.cpp
185@@ -4343,7 +4343,7 @@ JVM_ENTRY(jlong,JVM_DTraceActivate(
186 JVM_DTraceProvider* providers))
187 JVMWrapper("JVM_DTraceActivate");
188 return DTraceJSDT::activate(
189- version, module_name, providers_count, providers, CHECK_0);
190+ version, module_name, providers_count, providers, THREAD);
191 JVM_END
192
193 JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))
194diff --git a/hotspot/src/share/vm/runtime/reflection.cpp b/hotspot/src/share/vm/runtime/reflection.cpp
195index 4b39d8ccb..9cd7b0dcb 100644
196--- a/hotspot/src/share/vm/runtime/reflection.cpp
197+++ b/hotspot/src/share/vm/runtime/reflection.cpp
198@@ -1093,7 +1093,7 @@ oop Reflection::invoke(instanceKlassHandle klass, methodHandle reflected_method,
199 } else {
200 if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
201 narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
202- return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
203+ return box((jvalue*) result.get_value_addr(), rtype, THREAD);
204 }
205 }
206
207diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
208index d5bea29c3..50578ad63 100644
209--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp
210+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
211@@ -1041,7 +1041,7 @@ Handle SharedRuntime::find_callee_info(JavaThread* thread, Bytecodes::Code& bc,
212 // last java frame on stack (which includes native call frames)
213 vframeStream vfst(thread, true); // Do not skip and javaCalls
214
215- return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
216+ return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
217 }
218
219
220diff --git a/hotspot/src/share/vm/services/memTracker.hpp b/hotspot/src/share/vm/services/memTracker.hpp
221index 7ad2b71f4..182084373 100644
222--- a/hotspot/src/share/vm/services/memTracker.hpp
223+++ b/hotspot/src/share/vm/services/memTracker.hpp
224@@ -64,7 +64,7 @@ class MemTracker : AllStatic {
225 const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
226 static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
227 static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
228- static inline Tracker get_virtual_memory_release_tracker() { }
229+ static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
230 static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
231 static inline void record_thread_stack(void* addr, size_t size) { }
232 static inline void release_thread_stack(void* addr, size_t size) { }
233--
2342.24.1
235