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

2023-09-11 Thread Johan Vos
On Wed, 30 Aug 2023 15:50:57 GMT, Jayathirth D V wrote: >> At multiple places in native glass code we don't have appropriate NULL >> checks which might result in null pointer access. >> >> Added appropriate checks and all test run is green. > > Jayathirth D V has updated the pull request increm

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

2023-09-11 Thread Kevin Rushforth
On Wed, 30 Aug 2023 15:50:57 GMT, Jayathirth D V wrote: >> At multiple places in native glass code we don't have appropriate NULL >> checks which might result in null pointer access. >> >> Added appropriate checks and all test run is green. > > Jayathirth D V has updated the pull request increm

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

2023-09-11 Thread Kevin Rushforth
On Tue, 29 Aug 2023 17:13:17 GMT, Johan Vos wrote: >> Jayathirth D V has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix typo > > the ios changes are fine. > In general, I'm still worried about the consequences of silently ignoring a >

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

2023-09-11 Thread Kevin Rushforth
On Mon, 11 Sep 2023 15:21:37 GMT, Kevin Rushforth 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 le

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

2023-09-11 Thread Kevin Rushforth
On Tue, 29 Aug 2023 13:54:19 GMT, Kevin Rushforth wrote: >> I'm not against that, especially since it's in line with what we do in other >> functions in glass. >> However, I am worried about the consequences. In case we just return, the >> caller has no idea that there is a major problem. A Run

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

2023-08-30 Thread Jayathirth D V
On Tue, 29 Aug 2023 07:03:32 GMT, Marius Hanl wrote: >> Jayathirth D V has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix typo > > modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp line > 270: > >> 268: //

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

2023-08-30 Thread Jayathirth D V
> At multiple places in native glass code we don't have appropriate NULL checks > which might result in null pointer access. > > Added appropriate checks and all test run is green. Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision: F

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Johan Vos
On Mon, 28 Aug 2023 04:58:31 GMT, Jayathirth D V wrote: > At multiple places in native glass code we don't have appropriate NULL checks > which might result in null pointer access. > > Added appropriate checks and all test run is green. the ios changes are fine. In general, I'm still worried a

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 12:56:35 GMT, Johan Vos wrote: >> The idea is to avoid the crash entirely. If we actually hit this case, it is >> very likely that other calls will also run out of memory. Returning to Java >> as quickly as possible will let any pending OOME be thrown. A library should >> n

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Johan Vos
On Tue, 29 Aug 2023 12:33:53 GMT, Kevin Rushforth wrote: >> I agree a crash due to a null pointer is not desired, as that gives very >> little info to the developer. >> If that malloc fails, it is an indication that there is a major chance that >> we are in serious trouble. In that case, simpl

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Kevin Rushforth
On Tue, 29 Aug 2023 08:07:49 GMT, Johan Vos wrote: >> That's a good question. Since this is a void method (thus there is no way to >> signal an error), the ideal thing would be to throw an `OutOfMemoryError` >> before returning, but if a malloc of this small size were to fail, we might >> not

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Johan Vos
On Mon, 28 Aug 2023 21:28:01 GMT, Kevin Rushforth wrote: >> modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp line >> 270: >> >>> 268: // we release this context in call_runnable >>> 269: } else { >>> 270: fprintf(stderr, "malloc failed in >>> GtkApplic

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-29 Thread Marius Hanl
On Mon, 28 Aug 2023 04:58:31 GMT, Jayathirth D V wrote: > At multiple places in native glass code we don't have appropriate NULL checks > which might result in null pointer access. > > Added appropriate checks and all test run is green. modules/javafx.graphics/src/main/native-glass/gtk/GlassAp

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-28 Thread Kevin Rushforth
On Mon, 28 Aug 2023 20:30:18 GMT, Johan Vos wrote: >> At multiple places in native glass code we don't have appropriate NULL >> checks which might result in null pointer access. >> >> Added appropriate checks and all test run is green. > > modules/javafx.graphics/src/main/native-glass/gtk/Glass

Re: RFR: 8315074: Possible null pointer access in native glass

2023-08-28 Thread Johan Vos
On Mon, 28 Aug 2023 04:58:31 GMT, Jayathirth D V wrote: > At multiple places in native glass code we don't have appropriate NULL checks > which might result in null pointer access. > > Added appropriate checks and all test run is green. modules/javafx.graphics/src/main/native-glass/gtk/GlassAp