GNU bug report logs - #20890
[cairo] crash on startup

Previous Next

Package: emacs;

Reported by: Robert Marshall <robert <at> capuchin.co.uk>

Date: Wed, 24 Jun 2015 10:28:02 UTC

Severity: normal

Merged with 33974

Found in versions 26.1.90, 25.0.50

Fixed in version 26.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 20890 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: 20890 <at> debbugs.gnu.org
Cc: "K. Handa" <handa <at> gnu.org>, Robert Marshall <robert <at> capuchin.co.uk>,
 Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: 25.0.50; build from git crashes on startup
Date: Tue, 03 Apr 2018 11:39:10 +0200
tags 20890 patch

Paul Eggert <eggert <at> 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));




This bug report was last modified 6 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.