Bug 1657542

Summary: crash in pango_fc_font_key_get_variations for some (eclipse based?) apps
Product: [Fedora] Fedora Reporter: Roberto Ragusa <bugzillaredhat-56f0>
Component: pangoAssignee: Peng Wu <pwu>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 29CC: fonts-bugs, i18n-bugs, john.j5live, mclasen, pwu, rhughes, rstrode, sandmann, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pango-1.42.4-2.fc29 pango-1.42.4-2.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-21 02:02:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch from gentoo, fixes the problem for me none

Description Roberto Ragusa 2018-12-09 20:16:29 UTC
Description of problem:
Segmentation error in pango_fc_font_key_get_variations().

Version-Release number of selected component (if applicable):
pango-1.42.4-1.fc29

How reproducible:
I can reproduce it with a non opensource application that started to crash
after updating my Fedora 27 to Fedora 29.
The application is eclipse based; same problem has been reported for MATLAB.

Steps to Reproduce:
Have the application do some rendering involving fonts.

Actual results:
Crash.

Expected results:
Normal content display.

Additional info:

Problem already well known; see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898960
https://bugs.gentoo.org/671136
https://github.com/gentoo/gentoo/pull/10417

The gentoo patch actually solved the problem when applied
to pango-1.42.4-1.fc29 (I got fixed packages by running mock).

diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index a59ca67c..53269d73 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -380,8 +380,10 @@ _pango_fc_shape (PangoFont           *font,
                    fc_font->is_hinted ? ft_face->size->metrics.x_ppem : 0,
                    fc_font->is_hinted ? ft_face->size->metrics.y_ppem : 0);
 
-  variations = pango_fc_font_key_get_variations (key);
-  if (variations)
+  if (key)
+  {
+    variations = pango_fc_font_key_get_variations (key);
+    if (variations)
     {
       guint n_variations;
       hb_variation_t *hb_variations;
@@ -391,6 +393,7 @@ _pango_fc_shape (PangoFont           *font,
 
       g_free (hb_variations);
     }
+  }
 
   hb_buffer = acquire_buffer (&free_buffer);

Comment 1 Roberto Ragusa 2018-12-09 20:22:47 UTC
Created attachment 1512901 [details]
patch from gentoo, fixes the problem for me

Comment 3 Fedora Update System 2019-01-18 08:45:25 UTC
pango-1.42.4-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2e1cc4fe99

Comment 4 Fedora Update System 2019-01-18 08:45:29 UTC
pango-1.42.4-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6ddb6df684

Comment 5 Fedora Update System 2019-01-18 19:03:01 UTC
pango-1.42.4-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6ddb6df684

Comment 6 Fedora Update System 2019-01-19 01:43:41 UTC
pango-1.42.4-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2e1cc4fe99

Comment 7 Fedora Update System 2019-01-21 02:02:18 UTC
pango-1.42.4-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2019-02-08 02:29:03 UTC
pango-1.42.4-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.