[aarch64-port-dev ] [OpenJDK8u] java.nio.Bits.unaligned() doesn't handle aarch64

White, Derek Derek.White at cavium.com
Fri Aug 4 22:58:11 UTC 2017


Re-propose fix, now that 8u141 was merged:

Updated patch:

--- old/src/share/classes/java/nio/Bits.java	2017-08-04 18:18:12.562452645 -0400
+++ new/src/share/classes/java/nio/Bits.java	2017-08-04 18:18:12.482454700 -0400
@@ -615,7 +615,8 @@
             new sun.security.action.GetPropertyAction("os.arch"));
         unaligned = arch.equals("i386") || arch.equals("x86")
             || arch.equals("amd64") || arch.equals("x86_64")
-            || arch.equals("ppc64") || arch.equals("ppc64le");
+            || arch.equals("ppc64") || arch.equals("ppc64le")
+            || arch.equals("aarch64");
         unalignedKnown = true;
         return unaligned;
     }

- Derek

> -----Original Message-----
> From: White, Derek
> Sent: Thursday, May 11, 2017 4:39 PM
> To: 'Andrew Haley' <aph at redhat.com>; aarch64-port-dev at openjdk.java.net
> Subject: RE: [aarch64-port-dev ] [OpenJDK8u] java.nio.Bits.unaligned()
> doesn't handle aarch64
> 
> Hi Andrew,
> 
> No problem, but I'm not sure if you want me to remove the "ppc" code in my
> patch, or add the similar "aarch64" to the remainder of the ppc patch.
> 
> Thanks!
> 
>  - Derek
> 
> -----Original Message-----
> From: Andrew Haley [mailto:aph at redhat.com]
> Sent: Thursday, May 11, 2017 3:41 PM
> To: White, Derek <Derek.White at cavium.com>; aarch64-port-
> dev at openjdk.java.net
> Subject: Re: [aarch64-port-dev ] [OpenJDK8u] java.nio.Bits.unaligned()
> doesn't handle aarch64
> 
> On 11/05/17 18:20, White, Derek wrote:
> 
> > In mainline jdk8u, this was updated to include PPC as well (See
> > https://bugs.openjdk.java.net/browse/JDK-8165231). JDK9 has a much
> > better fix that supports aarch64 already.
> >
> > Tested on Spark and off-heap memory was being used. Note: The PPC fix
> > also patched sun/security/provider/ByteArrayAccess.java, but I didn't
> > include this in the patch below (not sure if it matters, or how to
> > test it).
> 
> It's not a great idea to introduce a patch that will conflict with a patch we
> haven't yet merged.  We will get all the patches from jdk8u eventually, but
> we only merge from security updates and peroper releases.  I think we
> should add aarch64 support now, given that upstream jdk8u will never
> support it.
> 
> Andrew.



More information about the aarch64-port-dev mailing list