RFR (XS) 8245722: 32-bit build failures after JDK-8243491

Thomas Stüfe thomas.stuefe at gmail.com
Mon May 25 14:13:09 UTC 2020


Seems fine and trivial.

..Thomas

On Mon 25. May 2020 at 16:09, Aleksey Shipilev <shade at redhat.com> wrote:

> On 5/25/20 2:38 PM, Aleksey Shipilev wrote:
> > Bug:
> >   https://bugs.openjdk.java.net/browse/JDK-8245722
> >
> > This is similar to JDK-8236634, and fix takes the same form:
> >
> > diff -r d52c2e540934 test/jdk/java/foreign/libNativeAccess.c
> > --- a/test/jdk/java/foreign/libNativeAccess.c   Mon May 25 12:03:30 2020
> +0200
> > +++ b/test/jdk/java/foreign/libNativeAccess.c   Mon May 25 14:25:49 2020
> +0200
> > @@ -116,12 +116,12 @@
> >      return (*env)->GetDirectBufferCapacity(env, buf);
> >  }
> >
> >  JNIEXPORT jlong JNICALL
> >  Java_TestNative_allocate(JNIEnv *env, jclass cls, jint size) {
> > -    return (jlong)malloc(size);
> > +    return (jlong)(uintptr_t)malloc(size);
> >  }
> >
> >  JNIEXPORT void JNICALL
> >  Java_TestNative_free(JNIEnv *env, jclass cls, jlong ptr) {
> > -    free((void*) ptr);
> > +    free((void*)(uintptr_t)ptr);
> >  }
> >
> > Testing: {x86_32, x86_64} builds, jdk-submit (running)
>
> jdk-submit run is clean.
>
> --
> Thanks,
> -Aleksey
>
>


More information about the core-libs-dev mailing list