Segmentation fault in FcFontMatch when attempting to render emoji
Submitted by Alexander Krotov
Assigned to fon..@..op.org
Link to original bug (#107531)
Description
Created attachment 141016 A program to reproduce segmentation fault
dwm, dmenu and st (from https://suckless.org/) are known to segfault when trying to render emoji.
I have reduced dmenu segfault down to a simple program that reproduces the bug.
To reproduce, compile the program attached with
gcc bug.c -lX11 -lXft -I /usr/include/freetype2 -lfontconfig
and run.
Backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7821e71 in ?? () from /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
(gdb) bt
#0 0x00007ffff7821e71 in ?? () from /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
#1 0x00007ffff7821fc8 in ?? () from /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
#2 0x00007ffff7823028 in FcConfigSubstituteWithPat () from /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
#3 0x00007ffff78329dd in FcFontRenderPrepare () from /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
#4 0x00007ffff7832fc4 in FcFontMatch () from /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
#5 0x000055555555531c in main ()
Software versions:
$ cat /etc/debian_version buster/sid
$ apt show fontconfig Package: fontconfig Version: 2.13.0-5
Attachment 141016, "A program to reproduce segmentation fault":
bug.c