Subject: Segfault when messing with font-backend

From: Stefan Monnier <[email-masked]>
Date: Wed, 27 Apr 2016 09:13:30 -0400

Package: Emacs
Version: 25.0.50

If I do

    % emacs -Q --eval "(push '(font-backend x) default-frame-alist)"

I get a segfault.  This is with the latest emacs-25.
See the backtrace below.

        Stefan

Program received signal SIGSEGV, Segmentation fault.
0xf70b3b36 in XftCharIndex () from /usr/lib/i386-linux-gnu/libXft.so.2
(gdb) xbacktrace
(gdb) bt
#0  0xf70b3b36 in XftCharIndex () from /usr/lib/i386-linux-gnu/libXft.so.2
#1  0x082d4d69 in xftfont_encode_char (font=0x8779b00, c=92) at xftfont.c:537
#2  0x08074145 in get_char_glyph_code (c=<optimized out>, 
    font=font@entry=0x8779b00, char2b=char2b@entry=0xffffbbbe)
    at xdisp.c:24681
#3  0x080bdbfd in x_produce_glyphs (it=0xffffbc08) at xdisp.c:27011
#4  0x0807d80c in produce_special_glyphs (it=it@entry=0xffffc718, 
    what=what@entry=IT_CONTINUATION) at xdisp.c:26643
#5  0x0809bcd6 in init_iterator (it=<optimized out>, w=<optimized out>, 
    charpos=<optimized out>, bytepos=<optimized out>, row=<optimized out>, 
    base_face_id=<optimized out>) at xdisp.c:2856
#6  0x080b0bb4 in resize_mini_window (w=0x8852930, exact_p=true)
    at xdisp.c:10970
#7  0x080b0fa9 in resize_mini_window_1 (a1=142944560, exactly=...)
    at xdisp.c:10912
#8  0x080828d4 in with_echo_area_buffer (w=0x8852930, which=which@entry=0, 
    fn=fn@entry=0x80b0f91 <resize_mini_window_1>, a1=142944560, a2=...)
    at xdisp.c:10642
#9  0x080b7082 in resize_echo_area_exactly () at xdisp.c:10890
#10 0x081ad0d6 in command_loop_1 () at keyboard.c:1274
#11 0x0823977d in internal_condition_case (bfun=0x81ad053 <command_loop_1>, 
    handlers=..., hfun=0x819da9e <cmd_error>) at eval.c:1309
#12 0x081963cd in command_loop_2 (ignore=...) at keyboard.c:1099
#13 0x082396f4 in internal_catch (tag=..., func=0x81963ac <command_loop_2>, 
    arg=...) at eval.c:1074
#14 0x0819635c in command_loop () at keyboard.c:1078
#15 0x0819d535 in recursive_edit_1 () at keyboard.c:684
#16 0x0819d9b9 in Frecursive_edit () at keyboard.c:755
#17 0x08195adc in main (argc=<optimized out>, argv=0xffffd514) at emacs.c:1605
(gdb)