view patches/hotspot/aarch32/8062808-pr3548.patch @ 2986:2ba4051a8442

Bump shenandoah to aarch64-shenandoah-jdk8u282-b08. 2021-02-03 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump shenandoah to aarch64-shenandoah-jdk8u282-b08. * patches/hotspot/shenandoah/8062808-pr3548.patch, * patches/hotspot/shenandoah/8197981-pr3548.patch, * patches/hotspot/shenandoah/pr1869.patch, * patches/hotspot/shenandoah/pr3519-return_value-02.patch, * patches/hotspot/shenandoah/pr3601.patch: Remove patches included upstream. * Makefile.am: (ICEDTEA_PATCHES): Make PR1869, 8062808/PR3548, 8197981/PR3548 and PR3601 patches AArch32 only as they are now upstream in the new Shenandoah bundle. Remove Shenandoah-only PR3519 altogether. * NEWS: Updated. * hotspot.map.in: Bump shenandoah to aarch64-shenandoah-jdk8u282-b08. * patches/hotspot/aarch32/8062808-pr3548.patch: Replace symlink to Shenandoah version with a regenerated version that does not assume PR1748 is applied first. * patches/hotspot/aarch32/8143245-pr3548.patch, * patches/hotspot/aarch32/8197981-pr3548.patch: Replace symlinks to Shenandoah versions with copies, as the Shenandoah versions have been removed. * patches/hotspot/aarch32/pr1748.patch: Replace symlink to Shenandoah version with a regenerated version that applies after JDK-8062808, but without JDK-8036122 being applied as in the Shenandoah version. * patches/hotspot/aarch32/pr1869.patch, * patches/hotspot/aarch32/pr3601.patch, * patches/hotspot/aarch32/werror.patch: Replace symlinks to Shenandoah versions with copies, as the Shenandoah versions are either removed or modified to apply against 8u282-b08. * patches/hotspot/shenandoah/8143245-pr3548.patch: Regenerated against new context in cppInterpreter_zero.cpp due to JDK-8254166. * patches/hotspot/shenandoah/pr1748.patch: Regenerated against new context in linux/makefiles/gcc.make due to JDK-8062808 being upstreamed. * patches/hotspot/shenandoah/werror.patch: Regenerated against new context in solaris/makefiles/gcc.make due to JDK-8036122.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Thu, 04 Feb 2021 06:19:03 +0000
parents patches/hotspot/shenandoah/8062808-pr3548.patch@ca45ee064071
children
line wrap: on
line source

# HG changeset patch
# User stefank
# Date 1525453613 -3600
#      Fri May 04 18:06:53 2018 +0100
# Node ID 07a1135a327362f157955d470fad5df07cc35164
# Parent  de79964656fc652f2085dac4fe99bcc128b5a3b1
8062808, PR3548: Turn on the -Wreturn-type warning
Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett

diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2021-02-04 03:25:16.365416534 +0000
@@ -212,7 +212,7 @@
   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
 endif
 
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
 
 ifeq ($(USE_CLANG),)
   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
--- openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/cpu/x86/vm/x86_32.ad	2021-02-04 03:21:29.140836828 +0000
@@ -1250,6 +1250,7 @@
 
 
   Unimplemented();
+  return 0; // Mute compiler
 }
 
 #ifndef PRODUCT
diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
--- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2021-02-04 03:19:57.758799359 +0000
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2021-02-04 03:21:29.140836828 +0000
@@ -541,6 +541,7 @@
   err.report_and_die();
 
   ShouldNotReachHere();
+  return true; // Mute compiler
 }
 
 void os::Linux::init_thread_fpu_state(void) {
diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp
--- openjdk.orig/hotspot/src/share/vm/classfile/defaultMethods.cpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/classfile/defaultMethods.cpp	2021-02-04 03:21:29.141836839 +0000
@@ -506,7 +506,7 @@
   ss.write((const char*)name->bytes(), name->utf8_length());
   ss.write((const char*)signature->bytes(), signature->utf8_length());
   ss.print(" is abstract");
-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
+  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
 }
 
 Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
@@ -521,7 +521,7 @@
     ss.print(".");
     ss.write((const char*)name->bytes(), name->utf8_length());
   }
-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
+  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
 }
 
 
diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp
--- openjdk.orig/hotspot/src/share/vm/classfile/symbolTable.cpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/classfile/symbolTable.cpp	2021-02-04 03:21:29.141836839 +0000
@@ -249,7 +249,7 @@
   MutexLocker ml(SymbolTable_lock, THREAD);
 
   // Otherwise, add to symbol to table
-  return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
+  return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
 }
 
 Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
@@ -288,7 +288,7 @@
   // Grab SymbolTable_lock first.
   MutexLocker ml(SymbolTable_lock, THREAD);
 
-  return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
+  return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
 }
 
 Symbol* SymbolTable::lookup_only(const char* name, int len,
diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
--- openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp	2021-02-04 03:21:29.142836851 +0000
@@ -236,15 +236,15 @@
                  class_name->as_C_string(),
                  class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
   if (FieldType::is_array(class_name)) {
-    return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
+    return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
   } else if (FieldType::is_obj(class_name)) {
     ResourceMark rm(THREAD);
     // Ignore wrapping L and ;.
     TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
                                    class_name->utf8_length() - 2, CHECK_NULL);
-    return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
+    return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
   } else {
-    return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
+    return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
   }
 }
 
diff -Nru openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp openjdk/hotspot/src/share/vm/memory/heapInspection.hpp
--- openjdk.orig/hotspot/src/share/vm/memory/heapInspection.hpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/memory/heapInspection.hpp	2021-02-04 03:21:29.142836851 +0000
@@ -367,7 +367,7 @@
       _csv_format(csv_format), _print_help(print_help),
       _print_class_stats(print_class_stats), _columns(columns) {}
   void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
-  size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
+  size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
  private:
   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
diff -Nru openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp
--- openjdk.orig/hotspot/src/share/vm/memory/metaspaceShared.hpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/memory/metaspaceShared.hpp	2021-02-04 03:21:29.143836862 +0000
@@ -93,7 +93,7 @@
   static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
   static int preload_and_dump(const char * class_list_path,
                               GrowableArray<Klass*>* class_promote_order,
-                              TRAPS) NOT_CDS_RETURN;
+                              TRAPS) NOT_CDS_RETURN_(0);
 
   static ReservedSpace* shared_rs() {
     CDS_ONLY(return _shared_rs);
diff -Nru openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp openjdk/hotspot/src/share/vm/oops/constantPool.hpp
--- openjdk.orig/hotspot/src/share/vm/oops/constantPool.hpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/oops/constantPool.hpp	2021-02-04 03:21:29.143836862 +0000
@@ -353,7 +353,7 @@
 
   Klass* klass_at(int which, TRAPS) {
     constantPoolHandle h_this(THREAD, this);
-    return klass_at_impl(h_this, which, CHECK_NULL);
+    return klass_at_impl(h_this, which, THREAD);
   }
 
   Symbol* klass_name_at(int which) const;  // Returns the name, w/o resolving.
diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp openjdk/hotspot/src/share/vm/prims/jvm.cpp
--- openjdk.orig/hotspot/src/share/vm/prims/jvm.cpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/prims/jvm.cpp	2021-02-04 03:21:29.144836873 +0000
@@ -4368,7 +4368,7 @@
     JVM_DTraceProvider* providers))
   JVMWrapper("JVM_DTraceActivate");
   return DTraceJSDT::activate(
-    version, module_name, providers_count, providers, CHECK_0);
+    version, module_name, providers_count, providers, THREAD);
 JVM_END
 
 JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))
diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp openjdk/hotspot/src/share/vm/runtime/reflection.cpp
--- openjdk.orig/hotspot/src/share/vm/runtime/reflection.cpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/runtime/reflection.cpp	2021-02-04 03:21:29.144836873 +0000
@@ -1093,7 +1093,7 @@
   } else {
     if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
       narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
-    return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
+    return box((jvalue*) result.get_value_addr(), rtype, THREAD);
   }
 }
 
diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp	2021-02-04 03:21:29.145836885 +0000
@@ -1045,7 +1045,7 @@
   // last java frame on stack (which includes native call frames)
   vframeStream vfst(thread, true);  // Do not skip and javaCalls
 
-  return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
+  return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
 }
 
 
diff -Nru openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp openjdk/hotspot/src/share/vm/services/memTracker.hpp
--- openjdk.orig/hotspot/src/share/vm/services/memTracker.hpp	2020-11-08 08:27:57.000000000 +0000
+++ openjdk/hotspot/src/share/vm/services/memTracker.hpp	2021-02-04 03:21:29.145836885 +0000
@@ -64,7 +64,7 @@
     const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
   static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
   static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
-  static inline Tracker get_virtual_memory_release_tracker() { }
+  static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
   static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
   static inline void record_thread_stack(void* addr, size_t size) { }
   static inline void release_thread_stack(void* addr, size_t size) { }