On Sat, 20 Jan 2024 00:38:04 GMT, Phil Race <p...@openjdk.org> wrote:

>> Julian Waters has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 79 commits:
>> 
>>  - Merge branch 'openjdk:master' into patch-10
>>  - Merge branch 'openjdk:master' into patch-10
>>  - Fix awt_Window.cpp
>>  - Fix awt_PrintJob.cpp
>>  - -Zc:stringStrings no longer needed with -permissive- flags-cflags.m4
>>  - Fix awt_Window.cpp
>>  - awt_Window.cpp
>>  - awt_PrintJob.cpp
>>  - awt_Frame.cpp
>>  - Whitespace awt_Component.cpp
>>  - ... and 69 more: https://git.openjdk.org/jdk/compare/35e96627...cbfbaee6
>
> src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 3137:
> 
>> 3135: 
>> 3136:     PDATA pData = JNI_GET_PDATA(self);
>> 3137:     if (self == NULL) {
> 
> Surely line 3136 above should have been deleted ? It is replaced by line 3143 
> below.
> And then you can also directly set window, pData isn't needed, as discussed 
> in similar cases above

Yes. 

@TheShermanTanker This is in fact a serious bug. You try to do `pData = 
JNI_GET_PDATA(self)` before the null check of self, and this will crash if self 
is null.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1547836085

Reply via email to