Re: [OpenJDK 2D-Dev] RFR: 8266545: 8261169 broke Harfbuzz build with gcc 7 and 8

2021-05-06 Thread Aleksey Shipilev
On Wed, 5 May 2021 07:54:20 GMT, Thomas Stuefe wrote: > Harfbuzz upgrade broke Linux x64 build on older gccs. For details see JBS > issue. > > I fixed the issue in the harfbuzz sources, but I am not sure of the policy > here. Do we modify the harfbuzz sources or leave them untouched? Advice

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer [v2]

2021-04-21 Thread Aleksey Shipilev
On Fri, 12 Mar 2021 07:22:26 GMT, Aleksey Shipilev wrote: >> SonarCloud reports multiple incorrect double-checked locking cases in >> `sun.java2d.CRenderer`. For example: >> >> >> Arc2D arcToShape; >> >> ... >> if (arcTo

[OpenJDK 2D-Dev] Integrated: 8264923: PNGImageWriter.write_zTXt throws Exception with a typo

2021-04-09 Thread Aleksey Shipilev
On Thu, 8 Apr 2021 13:00:49 GMT, Aleksey Shipilev wrote: > Noticed this when backporting JDK-8242557: there is a trivial copy-paste > error in exception message. See: > https://hg.openjdk.java.net/jdk/jdk/rev/645c71334acd#l1.58 This pull request has now been integrated. Changeset:

Re: [OpenJDK 2D-Dev] RFR: 8264923: PNGImageWriter.write_zTXt throws Exception with a typo

2021-04-09 Thread Aleksey Shipilev
On Thu, 8 Apr 2021 16:55:49 GMT, Alexander Zuev wrote: >> Noticed this when backporting JDK-8242557: there is a trivial copy-paste >> error in exception message. See: >> https://hg.openjdk.java.net/jdk/jdk/rev/645c71334acd#l1.58 > > Marked as reviewed by kizune (Reviewer). Whoa, so many

[OpenJDK 2D-Dev] RFR: 8264923: PNGImageWriter.write_zTXt throws Exception with a typo

2021-04-08 Thread Aleksey Shipilev
Noticed this when backporting JDK-8242557: there is a trivial copy-paste error in exception message. See: https://hg.openjdk.java.net/jdk/jdk/rev/645c71334acd#l1.58 - Commit messages: - 8264923: PNGImageWriter.write_zTXt throws Exception with a typo Changes:

Re: [OpenJDK 2D-Dev] RFR: 8264428: Cleanup usages of StringBuffer in java.desktop

2021-04-01 Thread Aleksey Shipilev
On Thu, 1 Apr 2021 12:48:52 GMT, Andrey Turbanov wrote: >> Looks like this change goes beyond of simple replacement of StringBuffer >> with StringBuilder. Please update the description of the bug and PR >> description. > > I've updated PR description, but I don't have rights to update JIRA.

Re: [OpenJDK 2D-Dev] RFR: 8264428: Replace uses of StringBuffer with StringBuilder in java.desktop

2021-03-30 Thread Aleksey Shipilev
On Mon, 29 Mar 2021 20:50:14 GMT, Andrey Turbanov wrote: > Found by IntelliJ IDEA inspection `Java | Java language level migration aids > | Java 5 | 'StringBuffer' may be 'StringBuilder'` > As suggested in > https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created >

[OpenJDK 2D-Dev] Integrated: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

2021-03-24 Thread Aleksey Shipilev
On Mon, 22 Mar 2021 15:55:16 GMT, Aleksey Shipilev wrote: > SonarCloud reports the problem in ComponentSampleModel.equals: > Correct one of the identical sub-expressions on both sides of operator "&&" > > ...near "this.numBands == that.numBands&q

Re: [OpenJDK 2D-Dev] RFR: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

2021-03-24 Thread Aleksey Shipilev
On Tue, 23 Mar 2021 22:17:56 GMT, Sergey Bylokhov wrote: >> Please do. I'll wait for a bit. > > I have found this bug, and the fix for it just implemented both methods at > once, so this is a typo. > https://bugs.openjdk.java.net/browse/JDK-4430788 Brilliant, thanks. I'll integrate now.

Re: [OpenJDK 2D-Dev] RFR: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

2021-03-23 Thread Aleksey Shipilev
On Mon, 22 Mar 2021 18:01:49 GMT, Sergey Bylokhov wrote: >> I am a bit confused by this comment :) I suspect that `equals` got >> duplicated `numBands` first, and then whoever did the `hashcode` just hashed >> the same fields in the same order, duplicating it again. > > I hope so, and not in

Re: [OpenJDK 2D-Dev] RFR: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

2021-03-22 Thread Aleksey Shipilev
On Mon, 22 Mar 2021 17:44:03 GMT, Sergey Bylokhov wrote: >> SonarCloud reports the problem in ComponentSampleModel.equals: >> Correct one of the identical sub-expressions on both sides of operator "&&" >> >> ...near "this.numBands == that.numBands". It is checked twice. hashCode also >>

[OpenJDK 2D-Dev] RFR: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

2021-03-22 Thread Aleksey Shipilev
SonarCloud reports the problem in ComponentSampleModel.equals: Correct one of the identical sub-expressions on both sides of operator "&&" ...near "this.numBands == that.numBands". It is checked twice. hashCode also processes it twice. - Commit messages: - Update copyright line

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer

2021-03-11 Thread Aleksey Shipilev
On Fri, 12 Mar 2021 03:19:12 GMT, Sergey Bylokhov wrote: >> SonarCloud reports multiple incorrect double-checked locking cases in >> `sun.java2d.CRenderer`. For example: >> >> Arc2D arcToShape; >> >> ... >> if (arcToShape == null) { >> synchronized (this) { >>

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer [v2]

2021-03-11 Thread Aleksey Shipilev
f all > these objects under their own sync. So, maybe we can just allocate those > objects without DCL-backed caching and pass them in? Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Drop DCL and useless synchronization c

[OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer

2021-03-11 Thread Aleksey Shipilev
SonarCloud reports multiple incorrect double-checked locking cases in `sun.java2d.CRenderer`. For example: Arc2D arcToShape; ... if (arcToShape == null) { synchronized (this) { if (arcToShape == null) { arcToShape = new

Re: [OpenJDK 2D-Dev] RFR: JDK-8260432: allocateSpaceForGP in freetypeScaler.c might leak memory [v2]

2021-01-27 Thread Aleksey Shipilev
On Wed, 27 Jan 2021 13:09:56 GMT, Matthias Baesken wrote: >> The function AllocateSpaceForGP in freetypeScaler.c calls potentially 2 >> times malloc ; however the memory is not always freed correctly in case of >> errors. >> See also the related sonar issue : >>

Re: [OpenJDK 2D-Dev] RFR: JDK-8260432: allocateSpaceForGP in freetypeScaler.c might leak memory [v2]

2021-01-27 Thread Aleksey Shipilev
On Thu, 28 Jan 2021 07:53:44 GMT, Aleksey Shipilev wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> JDK-8260426 > > This looks fine to me, modulo stylistic nits Pull from maste

Re: [OpenJDK 2D-Dev] RFR: JDK-8260432: allocateSpaceForGP in freetypeScaler.c might leak memory

2021-01-27 Thread Aleksey Shipilev
On Wed, 27 Jan 2021 11:59:29 GMT, Matthias Baesken wrote: >> src/java.desktop/share/native/libfontmanager/freetypeScaler.c line 1290: >> >>> 1288: >>> 1289: /* failure if any of mallocs failed */ >>> 1290: if (gpdata->pointTypes == NULL || gpdata->pointCoords == NULL) >> >> I think it

Re: [OpenJDK 2D-Dev] RFR: JDK-8260432: allocateSpaceForGP in freetypeScaler.c might leak memory

2021-01-27 Thread Aleksey Shipilev
On Wed, 27 Jan 2021 08:39:33 GMT, Matthias Baesken wrote: > The function AllocateSpaceForGP in freetypeScaler.c calls potentially 2 > times malloc ; however the memory is not always freed correctly in case of > errors. > See also the related sonar issue : >

Re: [OpenJDK 2D-Dev] RFR: 8196086: java/awt/image/DrawImage/IncorrectSourceOffset.java fails

2020-11-26 Thread Aleksey Shipilev
On Sun, 22 Nov 2020 07:36:12 GMT, Sergey Bylokhov wrote: > These tests draw some specific pattern to the VolatileImage and to the > BufferedImage, and then compare pixels. > > The test uses the getSnapshot() method to get the pixels from VolatileImage, > and this method produces some

Re: [OpenJDK 2D-Dev] RFR: 8196086: java/awt/image/DrawImage/IncorrectSourceOffset.java fails

2020-11-23 Thread Aleksey Shipilev
On Sun, 22 Nov 2020 07:36:12 GMT, Sergey Bylokhov wrote: > These tests draw some specific pattern to the VolatileImage and to the > BufferedImage, and then compare pixels. > > The test uses the getSnapshot() method to get the pixels from VolatileImage, > and this method produces some

Re: [OpenJDK 2D-Dev] RFR (XS) 8250605: Linux x86_32 builds fail after JDK-8249821

2020-07-28 Thread Aleksey Shipilev
On 7/27/20 6:53 PM, Philip Race wrote: > OK .. although I hope to come back in JDK 16 and eliminate all disabled > warnings > from the now much smaller libfontmanager : > https://bugs.openjdk.java.net/browse/JDK-8074844 OK, pushed. -- Thanks, -Aleksey signature.asc Description: OpenPGP

[OpenJDK 2D-Dev] RFR (XS) 8250605: Linux x86_32 builds fail after JDK-8249821

2020-07-27 Thread Aleksey Shipilev
Bug: https://bugs.openjdk.java.net/browse/JDK-8250605 I believe this happens because int-to-pointer-cast is now enabled for libfontmanager. Below is the minimal fix, but I wonder if we should reinstate the disabled warning for clang (in the same manner) and msvc (which warning code that one

Re: [OpenJDK 2D-Dev] RFR(XS): 8213944: Fix AIX build after the removal of Xrandr.h and add a configure check for it

2018-11-16 Thread Aleksey Shipilev
On 11/15/2018 05:06 PM, Volker Simonis wrote: > can I please have a review for the following small change: > > http://cr.openjdk.java.net/~simonis/webrevs/2018/8213944/ *) I tested it on platform without libxrandr-dev installed, and configure reported the failure appopriately. *) Indent looks

Re: [OpenJDK 2D-Dev] JDK 9 RFR of JDK-8149896: Remove unnecessary values in FloatConsts and DoubleConsts

2016-02-16 Thread Aleksey Shipilev
On 02/16/2016 09:23 AM, joe darcy wrote: > Please review the webrev > > http://cr.openjdk.java.net/~darcy/8149896.0/ +1, nice cleanup. -Aleksey (not a Reviewer) signature.asc Description: OpenPGP digital signature