[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-openjfx-dev
Subject: Re: RFR: 8189092: ArrayIndexOutOfBoundsException on Linux in getCachedGlyph
From: Phil Race <prr () openjdk ! org>
Date: 2019-10-26 15:09:55
Message-ID: AMnfj82CVwp478QQtGqfzcxwQVoAg13U7LIF1eJy1Hs=.3bd963c7-77ad-41d6-95dd-0726d54ddd98 () github ! com
[Download RAW message or body]
On Sat, 26 Oct 2019 11:33:15 GMT, Laurent Bourgès \
<github.com+5607073+bourgesl@openjdk.org> wrote:
> On Fri, 25 Oct 2019 20:18:48 GMT, Phil Race <prr@openjdk.org> wrote:
>
> > I have added an evaluation in https://bugs.openjdk.java.net/browse/JDK-8207839
> > Please read that for more detail, but basically we are not properly preventing or
> > handling cases where fontconfig causes us to overflow the byte storage used
> > for a font "slot".
> >
> > ----------------
> >
> > Commits:
> > - b6c19466: Fix whitespace
> > - e00ef992: 8189092: ArrayIndexOutOfBoundsException on Linux in getCachedGlyph
> >
> > Changes: https://git.openjdk.java.net/jfx/pull/24/files
> > Webrev: https://webrevs.openjdk.java.net/jfx/24/webrev.00
> > Issue: https://bugs.openjdk.java.net/browse/JDK-8189092
> > Stats: 15 lines in 3 files changed: 12 ins; 0 del; 3 mod
> > Patch: https://git.openjdk.java.net/jfx/pull/24.diff
> > Fetch: git fetch https://git.openjdk.java.net/jfx pull/24/head:pull/24
>
> I had a quick look by curiosity as it is not my field. Explanations really make \
> sense, thanks Phil. Bit masks & shifts look good and definitely it will make that \
> code safer. However I wonder how to deal with more than 255 fonts (1 byte limit) as \
> it may happen on some systems, even not reallistic. Thanks
> However I wonder how to deal with more than 255 fonts (1 byte limit) as it may \
> happen on some systems, even not reallistic.
That would have to be > 255 fonts *per fontconfig font*, and we have additional \
filters to eliminate fonts that don't add value (at least we do now with fixing the \
bug in that code in fontpath_linux.c).
We could rework things to use 16 bit for font slot, although that would be a bigger \
change and require more testing and really this is never going to be needed on \
Windows or Mac, just some very small number of Linux systems that are not default \
configs ..
PR: https://git.openjdk.java.net/jfx/pull/24
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic