RFR: JDK-8273387: remove some unreferenced gtk-related functions

2021-09-07 Thread Matthias Baesken
Please review this small change.
Looks like there are a few functions, like gtk2_paint_diamond, that are 
unreferenced and can be removed.

Thanks, Matthias

-

Commit messages:
 - JDK-8273387

Changes: https://git.openjdk.java.net/jdk/pull/5384/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=5384=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273387
  Stats: 63 lines in 2 files changed: 0 ins; 61 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5384.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5384/head:pull/5384

PR: https://git.openjdk.java.net/jdk/pull/5384


Integrated: JDK-8262461: handle wcstombsdmp return value correctly in unix awt_InputMethod.c

2021-03-02 Thread Matthias Baesken
On Fri, 26 Feb 2021 14:19:03 GMT, Matthias Baesken  wrote:

> The function wcstombsdmp is called at a few places in awt_InputMethod.c.
> This function needs checking of a NULL return value and freeing of the memory 
> allocated by this function. However this is missing at one place in the file.

This pull request has now been integrated.

Changeset: dd33a8ea
Author:    Matthias Baesken 
URL:   https://git.openjdk.java.net/jdk/commit/dd33a8ea
Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod

8262461: handle wcstombsdmp return value correctly in unix awt_InputMethod.c

Reviewed-by: psadhukhan, azvegint, aivanov

-

PR: https://git.openjdk.java.net/jdk/pull/2747


RFR: JDK-8262461: handle wcstombsdmp return value correctly in unix awt_InputMethod.c

2021-02-26 Thread Matthias Baesken
The function wcstombsdmp is called at a few places in awt_InputMethod.c.
This function needs checking of a NULL return value and freeing of the memory 
allocated by this function. However this is missing at one place in the file.

-

Commit messages:
 - JDK-8262461

Changes: https://git.openjdk.java.net/jdk/pull/2747/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2747=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8262461
  Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2747.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2747/head:pull/2747

PR: https://git.openjdk.java.net/jdk/pull/2747


Integrated: JDK-8260426: awt debug_mem.c DMem_AllocateBlock might leak memory

2021-01-27 Thread Matthias Baesken
On Wed, 27 Jan 2021 09:56:05 GMT, Matthias Baesken  wrote:

> It seems that the function DMem_AllocateBlock (debug_mem.c) has an early 
> return that might lead to memory leaks.
> See also the sonar issue Potential leak of memory pointed to by 'header' :
> https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8B7zBBG2CXpcngZM=false=BLOCKER=BUG

This pull request has now been integrated.

Changeset: 11a70d11
Author:    Matthias Baesken 
URL:   https://git.openjdk.java.net/jdk/commit/11a70d11
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8260426: awt debug_mem.c DMem_AllocateBlock might leak memory

Reviewed-by: psadhukhan, aivanov

-

PR: https://git.openjdk.java.net/jdk/pull/2252


RFR: JDK-8260426: awt debug_mem.c DMem_AllocateBlock might leak memory

2021-01-27 Thread Matthias Baesken
It seems that the function DMem_AllocateBlock (debug_mem.c) has an early return 
that might lead to memory leaks.
See also the sonar issue Potential leak of memory pointed to by 'header' :
https://sonarcloud.io/project/issues?id=shipilev_jdk=c=AXck8B7zBBG2CXpcngZM=false=BLOCKER=BUG

-

Commit messages:
 - JDK-8260426

Changes: https://git.openjdk.java.net/jdk/pull/2252/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2252=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260426
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2252.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2252/head:pull/2252

PR: https://git.openjdk.java.net/jdk/pull/2252


Integrated: JDK-8255681: print callstack in error case in runAWTLoopWithApp

2020-11-03 Thread Matthias Baesken
On Tue, 3 Nov 2020 08:45:20 GMT, Matthias Baesken  wrote:

> Currently in case of occurences of an NSException in runAWTLoopWithApp we 
> catch the exception just print a simple error message like this :
> 
> 2020-10-30 15:28:33.027 java[634:8435] Apple AWT Startup Exception: Cannot 
> lock focus on image , 
> because it is size zero.
> 2020-10-30 15:28:33.306 java[634:8435] Apple AWT Restarting Native Event 
> Thread
> 
> But we omit the callstack and loose valuable information. This change  adds 
> the callstack to the output.

This pull request has now been integrated.

Changeset: ab9192e4
Author:Matthias Baesken 
URL:   https://git.openjdk.java.net/jdk/commit/ab9192e4
Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod

8255681: print callstack in error case in runAWTLoopWithApp

Reviewed-by: clanger, serb

-

PR: https://git.openjdk.java.net/jdk/pull/1032


RFR: JDK-8255681: print callstack in error case in runAWTLoopWithApp

2020-11-03 Thread Matthias Baesken
Currently in case of occurences of an NSException in runAWTLoopWithApp we catch 
the exception just print a simple error message like this :

2020-10-30 15:28:33.027 java[634:8435] Apple AWT Startup Exception: Cannot lock 
focus on image , because 
it is size zero.
2020-10-30 15:28:33.306 java[634:8435] Apple AWT Restarting Native Event Thread

But we omit the callstack and loose valuable information. This change  adds the 
callstack to the output.

-

Commit messages:
 - JDK-8255681

Changes: https://git.openjdk.java.net/jdk/pull/1032/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=1032=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255681
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1032.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1032/head:pull/1032

PR: https://git.openjdk.java.net/jdk/pull/1032


Integrated: JDK-8253791: Issue with useAppleColor check in CSystemColors.m

2020-09-29 Thread Matthias Baesken
On Tue, 29 Sep 2020 14:40:27 GMT, Matthias Baesken  wrote:

> While looking into XCode 12 compilation issues, a problem in
> jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m was found 
> when checking the useAppleColor flag .
> Because this is a general issue and not really much related to XCode 12 (just 
> shown when using the new compiler) a
> separate issue is filed for it.  See also
> https://git.openjdk.java.net/jdk/pull/348
> (where Paul Hohensee created a change containing another XCode 12 issue;  but 
> in the discussion it was seen as
> beneficial to separate the 2)
> Best regards, Matthias

This pull request has now been integrated.

Changeset: 4622a18a
Author:Matthias Baesken 
URL:   https://git.openjdk.java.net/jdk/commit/4622a18a
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8253791: Issue with useAppleColor check in CSystemColors.m

Reviewed-by: phh, lucy, serb

-

PR: https://git.openjdk.java.net/jdk/pull/403


RFR: JDK-8253791: Issue with useAppleColor check in CSystemColors.m

2020-09-29 Thread Matthias Baesken
While looking into XCode 12 compilation issues, a problem in
jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m was found 
when checking the useAppleColor flag .
Because this is a general issue and not really much related to XCode 12 (just 
shown when using the new compiler) a
separate issue is filed for it.

See also
https://git.openjdk.java.net/jdk/pull/348
(where Paul Hohensee created a change containing another XCode 12 issue;  but 
in the discussion it was seen as
beneficial to separate the 2)

Best regards, Matthias

-

Commit messages:
 - JDK-8253791

Changes: https://git.openjdk.java.net/jdk/pull/403/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=403=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253791
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/403.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/403/head:pull/403

PR: https://git.openjdk.java.net/jdk/pull/403


Re: RFR: 8253375: OSX build fails with Xcode 12.0 (12A7209)

2020-09-29 Thread Matthias Baesken
On Tue, 29 Sep 2020 07:11:34 GMT, Matthias Baesken  wrote:

>> src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m line 129:
>> 
>>> 127: NSColor* result = nil;
>>> 128:
>>> 129: if (colorIndex < ((useAppleColor) ? 
>>> sun_lwawt_macosx_LWCToolkit_NUM_APPLE_COLORS :
>>> java_awt_SystemColor_NUM_COLORS)) {
>> 
>> This looks like a plain old bug fix, nothing really to do with the compiler 
>> upgrade.  The new compiler presumably just
>> has a new warning that brought attention to the problem.  As such, I don't 
>> think it belongs in a PR that's about issues
>> related to the compiler upgrade.  Someone might want to backport just this 
>> fix, for example.
>
> Hello  Kim, Paul -  so should we open a separate bug for the
> src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m issue because 
> it might be a general  problem just
> uncovered by the new compiler ? Paul , do you want to do this ? Or should I 
> open a bug and post a separate change for
> the useAppleColor check in CSystemColors.m ?

I created
https://bugs.openjdk.java.net/browse/JDK-8253791
8253791: Issue with useAppleColor check in CSystemColors.m
for this issue (Kim and Paul are fine to have a separate JBS issue for this)

-

PR: https://git.openjdk.java.net/jdk/pull/348


Re: RFR: 8253375: OSX build fails with Xcode 12.0 (12A7209)

2020-09-29 Thread Matthias Baesken
On Fri, 25 Sep 2020 06:06:31 GMT, Kim Barrett  wrote:

>> Please review this small patch to enable the OSX build using Xcode 12.0.
>> 
>> Thanks,
>> Paul
>
> src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m line 129:
> 
>> 127: NSColor* result = nil;
>> 128:
>> 129: if (colorIndex < ((useAppleColor) ? 
>> sun_lwawt_macosx_LWCToolkit_NUM_APPLE_COLORS :
>> java_awt_SystemColor_NUM_COLORS)) {
> 
> This looks like a plain old bug fix, nothing really to do with the compiler 
> upgrade.  The new compiler presumably just
> has a new warning that brought attention to the problem.  As such, I don't 
> think it belongs in a PR that's about issues
> related to the compiler upgrade.  Someone might want to backport just this 
> fix, for example.

Hello  Kim, Paul -  so should we open a separate bug for the
src/java.desktop/macosx/native/libawt_lwawt/awt/CSystemColors.m issue because 
it might be a general  problem just
uncovered by the new compiler ? Paul , do you want to do this ? Or should I 
open a bug and post a separate change for
the useAppleColor check in CSystemColors.m ?

-

PR: https://git.openjdk.java.net/jdk/pull/348