← Back to team overview

openjdk team mailing list archive

Bug#895955: openjdk-10: Please backport build fixes for sparc64

 

Source: openjdk-10
Version: 10~46-5
Severity: normal
Tags: patch
User: debian-sparc@xxxxxxxxxxxxxxxx
Usertags: sparc64

Hello!

The attached debdiff adds a patch which fixes the build
openjdk-10 on sparc64. The patch includes the two changes
from upstream:

 * 8201616: Hotspot crashes on linux-sparc after 8189941
 * 8201480: ISA/CPU feature detection code crashes on linux-sparc

--- openjdk-10-10~46.orig/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp
+++ openjdk-10-10~46/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp
@@ -373,7 +373,7 @@ inline static bool checkOverflow(sigcont
 }
 
 inline static bool checkPollingPage(address pc, address fault, address* stub) {
-  if (fault == os::get_polling_page()) {
+  if (os::is_poll_address(fault)) {
     *stub = SharedRuntime::get_poll_stub(pc);
     return true;
   }
--- openjdk-10-10~46.orig/src/hotspot/os_cpu/linux_sparc/vm_version_linux_sparc.cpp
+++ openjdk-10-10~46/src/hotspot/os_cpu/linux_sparc/vm_version_linux_sparc.cpp
@@ -56,7 +56,7 @@ public:
     }
   }
 
-  ~CPUinfo() { os::free((void*)_string); }
+  ~CPUinfo() { free((void*)_string); }
 
   const char* value() const { return _string; }

Please consider including the patch for the next upload.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@xxxxxxxxxx
`. `'   Freie Universitaet Berlin - glaubitz@xxxxxxxxxxxxxxxxxxx
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
diff -Nru old/openjdk-10-10~46/debian/patches/series new/openjdk-10-10~46/debian/patches/series
--- old/openjdk-10-10~46/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ new/openjdk-10-10~46/debian/patches/series	2018-04-17 22:44:49.015596334 +0200
@@ -0,0 +1 @@
+sparc-fixes.diff
diff -Nru old/openjdk-10-10~46/debian/patches/sparc-fixes.diff new/openjdk-10-10~46/debian/patches/sparc-fixes.diff
--- old/openjdk-10-10~46/debian/patches/sparc-fixes.diff	1970-01-01 01:00:00.000000000 +0100
+++ new/openjdk-10-10~46/debian/patches/sparc-fixes.diff	2018-04-17 22:46:55.344492711 +0200
@@ -0,0 +1,28 @@
+Description: Backport two fixes for linux-sparc
+ 8201616: Hotspot crashes on linux-sparc after 8189941
+ 8201480: ISA/CPU feature detection code crashes on linux-sparc
+Author: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
+Last-Update: 2018-04-17
+
+--- openjdk-10-10~46.orig/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp
++++ openjdk-10-10~46/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp
+@@ -373,7 +373,7 @@ inline static bool checkOverflow(sigcont
+ }
+ 
+ inline static bool checkPollingPage(address pc, address fault, address* stub) {
+-  if (fault == os::get_polling_page()) {
++  if (os::is_poll_address(fault)) {
+     *stub = SharedRuntime::get_poll_stub(pc);
+     return true;
+   }
+--- openjdk-10-10~46.orig/src/hotspot/os_cpu/linux_sparc/vm_version_linux_sparc.cpp
++++ openjdk-10-10~46/src/hotspot/os_cpu/linux_sparc/vm_version_linux_sparc.cpp
+@@ -56,7 +56,7 @@ public:
+     }
+   }
+ 
+-  ~CPUinfo() { os::free((void*)_string); }
++  ~CPUinfo() { free((void*)_string); }
+ 
+   const char* value() const { return _string; }
+ 
diff -Nru old/openjdk-10-10~46/debian/rules new/openjdk-10-10~46/debian/rules
--- old/openjdk-10-10~46/debian/rules	2018-04-15 03:06:41.000000000 +0200
+++ new/openjdk-10-10~46/debian/rules	2018-04-17 22:47:10.841091851 +0200
@@ -330,6 +330,7 @@
 	docs-build-workaround.diff \
 	hotspot-ia64.diff \
 	8198649.diff \
+	sparc-fixes.diff \
 
 ifeq ($(derivative),Ubuntu)
   COMMON_PATCHES += \