unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 23386@debbugs.gnu.org
Subject: bug#23386: Segfault when messing with font-backend
Date: Wed, 27 Apr 2016 10:23:00 -0400	[thread overview]
Message-ID: <jwva8kf9lv0.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <83y47zxi81.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Apr 2016 17:02:38 +0300")

>> % emacs -Q --eval "(push '(font-backend x) default-frame-alist)"
>> I get a segfault.  This is with the latest emacs-25.
> Not reproducible here, but then I cannot run an X version.  (I did try
> an equivalent for Windows; it didn't crash.)

Not surprised: it seems specific to the X11 code.

>> 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
> Can you tell which arguments to XftCharIndex were invalid in this
> case?

I guess it's the second arg (xftfont_info->xftfont), which is NULL.

    Program received signal SIGSEGV, Segmentation fault.
    0xf70b3b36 in XftCharIndex () from /usr/lib/i386-linux-gnu/libXft.so.2
    (gdb) up
    #1  0x082d4d69 in xftfont_encode_char (font=0x8779af0, c=92) at xftfont.c:537
    (gdb) p xftfont_info->display
    $1 = (Display *) 0x86f2368
    (gdb) p xftfont_info->xftfont
    $2 = (XftFont *) 0x0
    (gdb) p c
    $3 = 92
    (gdb)

> Also, is 'x' a valid font-backend symbol?

AFAIK yes.

> It's strange that Emacs uses xftfont when it should have been using
> xfont instead (AFAIU).

Indeed, that seems to be a big part of the problem.


        Stefan





  reply	other threads:[~2016-04-27 14:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27 13:13 bug#23386: Segfault when messing with font-backend Stefan Monnier
2016-04-27 14:02 ` Eli Zaretskii
2016-04-27 14:23   ` Stefan Monnier [this message]
2016-07-09 19:11     ` npostavs
2016-07-09 20:02       ` npostavs
2016-07-10 14:18         ` Eli Zaretskii
2016-07-10 20:15           ` npostavs
2016-07-10 17:29       ` Dmitry Antipov
2016-07-10 20:17         ` npostavs
2016-07-11 14:33           ` Eli Zaretskii
2016-07-12 15:20             ` Dmitry Antipov
2016-07-12 17:45               ` Eli Zaretskii
2016-07-12 17:58                 ` Dmitry Antipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwva8kf9lv0.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=23386@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).