Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1310845[details]
FontTest.java
Problem happens when only stix-fonts is available,
for example:
$ java FontTest
java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351)
at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)
at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
at sun.font.CompositeFont.getMapper(CompositeFont.java:409)
at sun.font.CompositeFont.canDisplay(CompositeFont.java:435)
at java.awt.Font.canDisplayUpTo(Font.java:2063)
at java.awt.font.TextLayout.singleFont(TextLayout.java:470)
at java.awt.font.TextLayout.<init>(TextLayout.java:531)
at FontTest.main(FontTest.java:15)
But output should be usually:
$ java FontTest
result: 5
or:
result: 6
Example steps to reproduce on Fedora:
dd if=/dev/zero of=f26.img bs=1G count=1
mkdir $PWD/f26.mount
mke2fs $PWD/f26.img
sudo mount $PWD/f26.img $PWD/f26.mount
sudo mock -r fedora-26-x86_64 --rootdir=$PWD/f26.mount --init
sudo mock -r fedora-26-x86_64 --rootdir=$PWD/f26.mount --install java-1.8.0-openjdk-devel stix-fonts
sudo cp FontTest.java $PWD/f26.mount
sudo mock -r fedora-26-x86_64 --rootdir=$PWD/f26.mount --shell
rpm -e aajohan-comfortaa-fonts-2.004-7.fc26.noarch ## installed by default
javac FontTest.java
java FontTest
exit
sudo umount $PWD/f26.mount
sudo rmdir $PWD/f26.mount
sudo rm f26.img
I am not 100% sure there is a problem with stix-fonts,
but this comment in sun/font/CompositeFont.java:CompositeFont()
may tell it should check bounds depending on what offset is
requested:
/* We will limit the number of slots to 254.
* We store the slot for a glyph id in a byte and we may use one slot
* for an EUDC font, and we may also create a composite
* using this composite as a backup for a physical font.
* So we want to leave space for the two additional slots.
*/
numSlots = (numSlots <= 254) ? numSlots : 254;
Comment 2Andrew John Hughes
2017-08-24 18:34:11 UTC
I'm working with upstream for this bug (and 1484079), for now I think we can ship our RPMs with this patch on the next update, since things will likely take longer.
Hi Mario,
We too are wondering if the date for the anticipated fix has been determined.
We are deploying CSDC's Amanda product on JBOSS 6.4 (RHEL 7.4) and are encountering several locations in the application where functions are failing to execute. CSDC has traced the problem to this Bug so we are eager to get a resolution.
Thanks!
-M
(In reply to Mark Butt from comment #8)
> Hi Mario,
>
> We too are wondering if the date for the anticipated fix has been determined.
> We are deploying CSDC's Amanda product on JBOSS 6.4 (RHEL 7.4) and are
> encountering several locations in the application where functions are
> failing to execute. CSDC has traced the problem to this Bug so we are eager
> to get a resolution.
The quickest way to resolve would be to install an additional font or replace STIX with a non CFF one, which will make things work already now. As for the patch actually going in the rpm there are few things to still consider but the patch is basically ready and we are working on shipping it, I can't say if this will hit the next update, the best to do is to keep observing this bug report for news.
Created attachment 1310845 [details] FontTest.java Problem happens when only stix-fonts is available, for example: $ java FontTest java.lang.ArrayIndexOutOfBoundsException: 0 at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351) at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81) at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62) at sun.font.CompositeFont.getMapper(CompositeFont.java:409) at sun.font.CompositeFont.canDisplay(CompositeFont.java:435) at java.awt.Font.canDisplayUpTo(Font.java:2063) at java.awt.font.TextLayout.singleFont(TextLayout.java:470) at java.awt.font.TextLayout.<init>(TextLayout.java:531) at FontTest.main(FontTest.java:15) But output should be usually: $ java FontTest result: 5 or: result: 6 Example steps to reproduce on Fedora: dd if=/dev/zero of=f26.img bs=1G count=1 mkdir $PWD/f26.mount mke2fs $PWD/f26.img sudo mount $PWD/f26.img $PWD/f26.mount sudo mock -r fedora-26-x86_64 --rootdir=$PWD/f26.mount --init sudo mock -r fedora-26-x86_64 --rootdir=$PWD/f26.mount --install java-1.8.0-openjdk-devel stix-fonts sudo cp FontTest.java $PWD/f26.mount sudo mock -r fedora-26-x86_64 --rootdir=$PWD/f26.mount --shell rpm -e aajohan-comfortaa-fonts-2.004-7.fc26.noarch ## installed by default javac FontTest.java java FontTest exit sudo umount $PWD/f26.mount sudo rmdir $PWD/f26.mount sudo rm f26.img I am not 100% sure there is a problem with stix-fonts, but this comment in sun/font/CompositeFont.java:CompositeFont() may tell it should check bounds depending on what offset is requested: /* We will limit the number of slots to 254. * We store the slot for a glyph id in a byte and we may use one slot * for an EUDC font, and we may also create a composite * using this composite as a backup for a physical font. * So we want to leave space for the two additional slots. */ numSlots = (numSlots <= 254) ? numSlots : 254;