RFR: 8246348: Crash in libpango on Ubuntu 20.04 with some unicode chars

Kevin Rushforth kcr at openjdk.java.net
Fri Jun 12 18:20:34 UTC 2020

On Fri, 12 Jun 2020 13:23:29 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Instead of a space you could use a ZWNJ U+FEFF. Because that is also the endian-ness
>> mark, Unicode actually prefers you now to use U+2060 but you need to make sure these
>> are processed correctly by pango. Unlike a space they should have no rendering effect - not even an advance.
> Once you address the question of storing a null value in the Map, the only remaining question I have is whether to use
> a LinkedHashMap instead of an ordinary HashMap. In general, I like the predictability of a LinkedHashMap for maps that
> are iterated, but in this case, I don't feel strongly about it one way or the other.

The fix looks good now.

As for the test, even if StubFont were updated to provide a real font, the StubToolkit doesn't load Prism (so none of
the text rendering code is exercised). Do you think you could instead add a simple test or two in the system tests
project instead (maybe one testing UTF16 chars and one with a 0 char)?


PR: https://git.openjdk.java.net/jfx/pull/249

More information about the openjfx-dev mailing list