RFR: 8315074: Possible null pointer access in native glass [v2]

Kevin Rushforth kcr at openjdk.org
Mon Sep 11 15:25:46 UTC 2023


On Mon, 11 Sep 2023 15:21:37 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> I can see what you are saying, but worth noting in this specific case is that if the malloc of `RunnableContext` (a 12-byte struct) fails, we're not going to be able to allocate an OOME anyway.
>> 
>> My preference would be to leave this fix as is, and file a follow-up issue to change the return type of `GtkApplication::submitForLaterInvocation` (and the equivalent methods in the other glass pipelines) to `boolean` so we can return an error code and throw an exception (which would very likely provoke an OOME, but in any case would never silently fail).
>
> I filed the following two follow-on umbrella tasks:
> 
> [JDK-8316020](https://bugs.openjdk.org/browse/JDK-8316020): ☂ Check memory allocation for null return value (P3)
> [JDK-8316022](https://bugs.openjdk.org/browse/JDK-8316022): ☂ Memory allocation failure should throw OOME (P4)

The first of these already has two linked blocking bugs (this one, and the previously integrated [JDK-8313900](https://bugs.openjdk.org/browse/JDK-8313900) / PR #1204)

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1223#discussion_r1321720588


More information about the openjfx-dev mailing list