From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#37786: 26.3; Emacs crashes when calling function to decode string Date: Fri, 25 Oct 2019 18:32:39 +0200 Message-ID: References: <80sgnsdn9a.fsf@felesatra.moe> <87zhi0knm5.fsf@gnus.org> <80wod21xu4.fsf@felesatra.moe> <80imol1qj9.fsf@felesatra.moe> <80d0ep4f7a.fsf@felesatra.moe> <805zkg3zyj.fsf@felesatra.moe> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="5110"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37786@debbugs.gnu.org To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 25 18:33:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iO2Wj-0001Bu-Rp for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Oct 2019 18:33:25 +0200 Original-Received: from localhost ([::1]:34508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iO2Wh-0002ke-6t for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Oct 2019 12:33:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38623) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iO2WN-0002aI-P8 for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 12:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iO2WM-0004zu-JF for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 12:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iO2WM-0004zm-Dz for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 12:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iO2WM-0003aG-8w for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 12:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Oct 2019 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37786 X-GNU-PR-Package: emacs Original-Received: via spool by 37786-submit@debbugs.gnu.org id=B37786.157202117013758 (code B ref 37786); Fri, 25 Oct 2019 16:33:02 +0000 Original-Received: (at 37786) by debbugs.gnu.org; 25 Oct 2019 16:32:50 +0000 Original-Received: from localhost ([127.0.0.1]:39305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iO2WA-0003Zq-4d for submit@debbugs.gnu.org; Fri, 25 Oct 2019 12:32:50 -0400 Original-Received: from mail-wr1-f67.google.com ([209.85.221.67]:36569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iO2W7-0003Zc-QU for 37786@debbugs.gnu.org; Fri, 25 Oct 2019 12:32:48 -0400 Original-Received: by mail-wr1-f67.google.com with SMTP id w18so3062046wrt.3 for <37786@debbugs.gnu.org>; Fri, 25 Oct 2019 09:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=VMqQd2PWDKVbA69JpofceV08xp7LQrY0+MwCf7ZOTAs=; b=Yvac5ckfnTAXJzLU/aJLc5nrr3WnwaaZUFFn4PKfa5Et03OzD/7ktASeMKmadGdToy YqM/TCcktvoa8jklFXXRmMq+pc9PP9Jg7x4f5HokP/65kwa+TYJHyia2isz291JVvN6+ /mRSzgrEuePBAxb3h77ujRTJmrWd75CYSQLy2gWVc5NRZgxOe9lo3/Y6qBgs9BKD33Zt pllN01pzIq6DsO2FhKMVbEo919o5ErNFrSNhDaqksck+j+uuL8CUAHEqIw1bsFyFEVbV fBpAa1P1AfR58VTycfOx1KRdR6UbwWGfTmwtXyqdxA8KAQqw3gxsPLgTXS15JuqIN7Rt C/Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=VMqQd2PWDKVbA69JpofceV08xp7LQrY0+MwCf7ZOTAs=; b=GRKQ/maXfo/ZLtacN5Q/TA68eY8bjIw4u+2VJkHLoqdivvA0FgxqWZ85iIHHj0519A 5xi2bquHPk/it5vh6VyBAbnSf6KDfnlHrw14685Q93eN2okEvSnV0MJ9WnzyRgjHwej3 nm1ZJjIuX6yF7kVgqeXF0LaQCyHPgION5JRJr8XaMFzR2m/SJLscGzWQXCgUFWH9GWHk OvuUrqwvwxfSgT/ILqmbqwVy2z6R1qhv9WK2fLU8RLAJuewSTIFxtxSUO5jASWzJn0Ag 55hsgMJcbIUkXqxvAEVfFgOJFuXWoiVmATLRHU1rXA+8u1Rb8WikiHTBFndRRWG0+jNk zVcQ== X-Gm-Message-State: APjAAAWii61h6kFe9cKGWp6Oz2KwVegMfO+iK/8C9ILluESd1qcBGUBs qrZymAYnkzUaGirNaa33OHAcKgtP X-Google-Smtp-Source: APXvYqxFAeepInCawZLXcfr8JgFOocaUy/rPSamZVgFmh+DeD9VEiW03NH8RpoVtOJycYFXKGYm2nw== X-Received: by 2002:a5d:5587:: with SMTP id i7mr3974894wrv.289.1572021161243; Fri, 25 Oct 2019 09:32:41 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id t1sm3431844wrn.81.2019.10.25.09.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 09:32:40 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <805zkg3zyj.fsf@felesatra.moe> (Allen Li's message of "Tue, 22 Oct 2019 20:25:40 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170164 Archived-At: >>>>> On Tue, 22 Oct 2019 20:25:40 -0700, Allen Li said: Allen> I haven't touched xft-ignore-color-fonts (and it reproduces from= emacs -Q) >>=20 Allen> #define FC_MAJOR 2 Allen> #define FC_MINOR 13 Allen> #define FC_REVISION 91 >>=20 That=CA=BCs a very recent (and maybe even unreleased) version of fontconfig. Allen> Arch Linux Hmm. Could you try the following against emacs-26 and see if it fixes your crash? (the character will almost certainly end up displayed wrong). This looks more like a fontconfig bug than anything else: the pattern we've supplied to FcFontList explicitly says "don=CA=BCt give me color fonts". diff --git i/lisp/international/fontset.el w/lisp/international/fontset.el index c90d4f53bd..e80a1a87b9 100644 --- i/lisp/international/fontset.el +++ w/lisp/international/fontset.el @@ -804,7 +804,6 @@ setup-default-fontset #x2664 (#x2667 . #x2669) (#x266C . #x26FF) - (#x2700 . #x27bF) ;; Dingbats (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A (#x27F0 . #x27FF) ;; Supplemental Arrows-A (#x2900 . #x297F) ;; Supplemental Arrows-B diff --git i/src/ftfont.c w/src/ftfont.c index 823fb2095c..017b349318 100644 --- i/src/ftfont.c +++ w/src/ftfont.c @@ -861,6 +861,9 @@ ftfont_list (struct frame *f, Lisp_Object spec) #endif /* FC_CAPABILITY */ #ifdef FC_FONTFORMAT FC_FONTFORMAT, +#endif +#ifdef FC_COLOR + FC_COLOR, #endif NULL); if (! objset) @@ -902,6 +905,15 @@ ftfont_list (struct frame *f, Lisp_Object spec) { Lisp_Object entity; + { + FcBool b; + if (FcPatternGetBool (fontset->fonts[i], FC_COLOR, 0, &b) + =3D=3D FcResultMatch && b) + { + fprintf (stderr, "Skipping Color font\n"); + continue; + } + } if (spacing >=3D 0) { int this;