[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-awt-dev
Subject:    Re: RFR: JDK-8318955: Add ReleaseIntArrayElements in Java_sun_awt_X11_XlibWrapper_SetBitmapShape Xlb
From:       Phil Race <prr () openjdk ! org>
Date:       2023-10-31 16:12:36
Message-ID: TaTyBi2B5e5Kp7Zz70k90083BlVixFnn-APPLF-lX44=.2db58202-cd67-4cee-af58-e226268f8fb6 () github ! com
[Download RAW message or body]

On Tue, 31 Oct 2023 08:06:25 GMT, Matthias Baesken <mbaesken@openjdk.org> wrote:

> > src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c line 2303:
> > 
> > > 2301:     if (!pRect) {
> > > 2302:         (*env)->ReleaseIntArrayElements(env, bitmap, values, JNI_ABORT);
> > > 2303:         JNU_ThrowOutOfMemoryError(env, "malloc failed");
> > 
> > I think the throw is unnecessary. You will get some incorrect rendering, but \
> > that's all.
> 
> So should I remove the  JNU_ThrowOutOfMemoryError ?  The calloc in the same file \
> has a JNU_ThrowOutOfMemoryError (but maybe the situation is different there?)  .

Fair question. That other case is used only during initialisation and if they fail \
then some things are not set up properly. So different enough. Yes, I think you can \
remove the one you are adding. If it ever happens it could be recoverable.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16392#discussion_r1377841716


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic