Closed Bug 1816429 Opened 2 years ago Closed 2 years ago

Crash in [@ gfxFcPlatformFontList::InitSharedFontListForPlatform::$::operator()]

Categories

(Core :: Widget: Gtk, defect)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox110 --- wontfix
firefox111 --- fixed
firefox112 --- fixed

People

(Reporter: gsvelto, Assigned: stransky)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/42d606f1-8db1-4f32-99e6-47afe0230211

Reason: SIGSEGV / SEGV_MAPERR

Top 10 frames of crashing thread:

0  libxul.so  gfxFcPlatformFontList::InitSharedFontListForPlatform const  gfx/thebes/gfxFcPlatformFontList.cpp:1837
1  libxul.so  gfxFcPlatformFontList::InitSharedFontListForPlatform  gfx/thebes/gfxFcPlatformFontList.cpp:1885
2  libxul.so  gfxPlatformFontList::InitFontList  gfx/thebes/gfxPlatformFontList.cpp:578
3  libxul.so  gfxPlatformFontList::Initialize  gfx/thebes/gfxPlatformFontList.cpp:266
4  libxul.so  gfxPlatform::Init  gfx/thebes/gfxPlatform.cpp:978
5  libxul.so  gfxPlatform::GetPlatform  gfx/thebes/gfxPlatform.cpp:463
6  libxul.so  gfxPlatform::InitializeCMS  gfx/thebes/gfxPlatform.cpp:2111
7  libxul.so  gfxPlatform::EnsureCMSInitialized  gfx/thebes/gfxPlatform.h:964
7  libxul.so  gfxPlatform::GetCMSMode  gfx/thebes/gfxPlatform.h:519
7  libxul.so  nsXPLookAndFeel::GetUncachedColor  widget/nsXPLookAndFeel.cpp:1008

Not 100% sure this is the right component but anyway... This is a startup crash hitting a NULL pointer returned by calls to FcConfigGetFonts(). Reading the documentation and peeking into the codebase it doesn't seem like FcConfigGetFonts() guarantees that it returns a non-NULL pointer so maybe we should just add NULL checks here? Or missing fonts would break rendering? Reading the comments I have the feeling that this is happening because the user was in the middle of a system upgrade and some files "disappeared" under Firefox.

OS: Unspecified → Linux

gfxFcPlatformFontList::AddFontSetFamilies() checks !aFontSet but addFontSetFamilies doesn't so looks like we're missing it.

Assignee: nobody → stransky
Status: NEW → ASSIGNED
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/84ecdd1962c8 Check aFontSet in addFontSetFamilies() r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch

The patch landed in nightly and beta is affected.
:stransky, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox111 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(stransky)

Comment on attachment 9317325 [details]
Bug 1816429 Check aFontSet in addFontSetFamilies() r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined: possible crashes while font processing
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): null pointer check
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(stransky)
Attachment #9317325 - Flags: approval-mozilla-beta?

Comment on attachment 9317325 [details]
Bug 1816429 Check aFontSet in addFontSetFamilies() r?emilio

Approved for 111.0b2

Attachment #9317325 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: