[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#904204: openjdk-11: Please update patch for m68k support



Source: openjdk-11
Version: 11~23-1
Severity: normal
Tags: patch
User: debian-68k@lists.debian.org
Usertags: m68k

Hello!

In order to make openjdk-11 build on m68k, the m68k-support.diff patch
needs to be updated. The current version doesn't apply anymore which
is why it was disabled in the past.

Please replace the patch with the attached version for the next upload.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
# HG changeset patch
# User glaubitz
# Date 1532184301 -7200
#      Sat Jul 21 16:45:01 2018 +0200
# Node ID 7acf28c3e4edd6d66f809828f0ec4122daf8f157
# Parent  b0fcf59be3918afcaa13d1f97343968c2c467ffe
JDK-NNNNNNN: Zero needs alignment fixes for linux-m68k

diff -r b0fcf59be391 -r 7acf28c3e4ed src/hotspot/share/memory/allocation.hpp
--- a/src/hotspot/share/memory/allocation.hpp	Fri Jul 20 14:48:41 2018 -0700
+++ b/src/hotspot/share/memory/allocation.hpp	Sat Jul 21 16:45:01 2018 +0200
@@ -209,7 +209,7 @@
 
   void  operator delete(void* p)     { FreeHeap(p); }
   void  operator delete [] (void* p) { FreeHeap(p); }
-};
+} __attribute__ ((aligned (4)));
 
 // Base class for objects allocated on the stack only.
 // Calling new or delete will result in fatal error.
@@ -223,7 +223,7 @@
 #endif
   void  operator delete(void* p);
   void  operator delete [](void* p);
-};
+} __attribute__ ((aligned (4)));
 
 // Base class for objects stored in Metaspace.
 // Calling delete will result in fatal error.
@@ -311,7 +311,7 @@
   // that should be read-only by default. See symbol.hpp for an example. This function
   // is used by the templates in metaspaceClosure.hpp
   static bool is_read_only_by_default() { return false; }
-};
+} __attribute__ ((aligned (4)));
 
 // Base class for classes that constitute name spaces.
 
@@ -401,7 +401,7 @@
 
   void  operator delete(void* p);
   void  operator delete [](void* p);
-};
+} __attribute__ ((aligned (4)));
 
 // One of the following macros must be used when allocating an array
 // or object to determine whether it should reside in the C heap on in
diff -r b0fcf59be391 -r 7acf28c3e4ed src/hotspot/share/oops/constMethod.hpp
--- a/src/hotspot/share/oops/constMethod.hpp	Fri Jul 20 14:48:41 2018 -0700
+++ b/src/hotspot/share/oops/constMethod.hpp	Sat Jul 21 16:45:01 2018 +0200
@@ -559,6 +559,6 @@
 
   // Verify
   void verify_on(outputStream* st);
-};
+} __attribute__ ((aligned (4)));
 
 #endif // SHARE_VM_OOPS_CONSTMETHODOOP_HPP
diff -r b0fcf59be391 -r 7acf28c3e4ed src/hotspot/share/oops/oop.hpp
--- a/src/hotspot/share/oops/oop.hpp	Fri Jul 20 14:48:41 2018 -0700
+++ b/src/hotspot/share/oops/oop.hpp	Sat Jul 21 16:45:01 2018 +0200
@@ -331,6 +331,6 @@
     assert(has_klass_gap(), "only applicable to compressed klass pointers");
     return klass_offset_in_bytes() + sizeof(narrowKlass);
   }
-};
+} __attribute__ ((aligned (4)));
 
 #endif // SHARE_VM_OOPS_OOP_HPP
diff -r b0fcf59be391 -r 7acf28c3e4ed src/java.base/unix/native/libjli/java_md_solinux.c
--- a/src/java.base/unix/native/libjli/java_md_solinux.c	Fri Jul 20 14:48:41 2018 -0700
+++ b/src/java.base/unix/native/libjli/java_md_solinux.c	Sat Jul 21 16:45:01 2018 +0200
@@ -727,12 +727,24 @@
     }
 }
 
+struct call_continuation_args {
+  int (JNICALL *continuation)(void *);
+  void *args;
+};
+
+static void *call_continuation(void *_args)
+{
+  struct call_continuation_args *args = _args;
+  return (void *)args->continuation(args->args);
+}
+
 /*
  * Block current thread and continue execution in a new thread
  */
 int
 ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
     int rslt;
+    struct call_continuation_args ccargs = { continuation, args };
 #ifndef __solaris__
     pthread_t tid;
     pthread_attr_t attr;
@@ -744,7 +756,7 @@
     }
     pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 
-    if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
+    if (pthread_create(&tid, &attr, call_continuation, &ccargs) == 0) {
       void * tmp;
       pthread_join(tid, &tmp);
       rslt = (int)(intptr_t)tmp;
@@ -762,7 +774,7 @@
 #else /* __solaris__ */
     thread_t tid;
     long flags = 0;
-    if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
+    if (thr_create(NULL, stack_size, call_continuation, &ccargs, flags, &tid) == 0) {
       void * tmp;
       thr_join(tid, NULL, &tmp);
       rslt = (int)(intptr_t)tmp;

Reply to: