unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: 20890@debbugs.gnu.org
Cc: Robert Marshall <robert@capuchin.co.uk>,
	Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#20890: 25.0.50; build from git crashes on startup
Date: Tue, 03 Apr 2018 11:39:10 +0200	[thread overview]
Message-ID: <87k1towrwh.fsf@gmail.com> (raw)
In-Reply-To: <55B54371.4000907@cs.ucla.edu> (Paul Eggert's message of "Sun, 26 Jul 2015 13:30:41 -0700")

tags 20890 patch

Paul Eggert <eggert@cs.ucla.edu> writes:

> Thanks for the bug report.  From the backtrace it appears that
> ftfont_close's implementation incorrectly assumes that ftfont_close
> can't be called from the garbage collector.  I've installed the
> attached FIXME comment and am CC'ing Kenichi Handa, who's an expert in
> ftfont.c.

Following Eli's suggestion in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30874#88>, Iʼve tested
the following workaround. It works, but it doesnʼt feel like the right
thing to do. However, without it, cairo builds are completely
unusable, and cairo is something we will need to enable by default in
future.

Robert


diff --git i/src/ftfont.c w/src/ftfont.c
index 24a92dd52e..5eda61af0e 100644
--- i/src/ftfont.c
+++ w/src/ftfont.c
@@ -1249,6 +1249,11 @@ ftfont_close (struct font *font)
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   Lisp_Object val, cache;
 
+#ifdef USE_CAIRO
+  /* Bug#20890 workaround.  */
+  if (gc_in_progress)
+    return;
+#endif
   val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index));
   cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE);
   eassert (CONSP (cache));





  reply	other threads:[~2018-04-03  9:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180403152442.25413.61540@vcs0.savannah.gnu.org>
     [not found] ` <20180403152443.B15F6215A9@vcs0.savannah.gnu.org>
     [not found]   ` <87a7ukc4zn.fsf@gmail.com>
     [not found]     ` <83k1tn4h4f.fsf@gnu.org>
2015-06-24 10:26       ` bug#20890: 25.0.50; build from git crashes on startup Robert Marshall
2015-07-26 20:30         ` Paul Eggert
2018-04-03  9:39           ` Robert Pluim [this message]
2018-04-03 10:06             ` Eli Zaretskii
2018-04-03 15:03               ` Paul Eggert
2018-04-03 15:13                 ` Eli Zaretskii
2018-04-03 15:26                   ` Paul Eggert
2018-04-04  8:52         ` bug#20890: master 1233bcb: Work around GC+Cairo bug Robert Pluim
2018-04-04  9:08           ` Eli Zaretskii
2018-04-04 12:10         ` Robert Pluim
2018-04-04 13:44           ` Eli Zaretskii
2018-04-04 18:00             ` Paul Eggert

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=87k1towrwh.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=20890@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=robert@capuchin.co.uk \
    /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).