From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#37786: 26.3; Emacs crashes when calling function to decode string Date: Sat, 26 Oct 2019 02:44:52 -0700 Message-ID: <801ruz4z8r.fsf@felesatra.moe> 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="263244"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: 37786@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 26 11:46:36 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 1iOIea-0016Lp-1S for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Oct 2019 11:46:36 +0200 Original-Received: from localhost ([::1]:39458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOIeX-0004BI-FM for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Oct 2019 05:46:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56698) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOIe3-00041z-VZ for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 05:46:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOIe2-00038x-Sy for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 05:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOIe2-00038n-I3 for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 05:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iOIe2-0006RO-Cb for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2019 05:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2019 09:46: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.157208310324674 (code B ref 37786); Sat, 26 Oct 2019 09:46:02 +0000 Original-Received: (at 37786) by debbugs.gnu.org; 26 Oct 2019 09:45:03 +0000 Original-Received: from localhost ([127.0.0.1]:39699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOId5-0006Pt-Cx for submit@debbugs.gnu.org; Sat, 26 Oct 2019 05:45:03 -0400 Original-Received: from mail-pg1-f194.google.com ([209.85.215.194]:43783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOId2-0006P7-Hg for 37786@debbugs.gnu.org; Sat, 26 Oct 2019 05:45:01 -0400 Original-Received: by mail-pg1-f194.google.com with SMTP id l24so3254813pgh.10 for <37786@debbugs.gnu.org>; Sat, 26 Oct 2019 02:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=9zqLCOJ4ewoiviLfM6ryhi20Tq4ElbjAhESukuweZ1M=; b=AjY96BA4pYPv8fxBBb2OVCdoNLyLxxpRPeIwTzCwDMxCqOOmzxIZPRnYTk870IpJHf /WSDjCSnWVCb3PXYsh620kM37s1arC4UHfrmyHBr7yDN5xDcy3smgzZngxxljrkQTqMB e65DwMBIp1TLvaz7evFUzQQ+l2lMGKV9FIlm/bYtzLvydE3oIebN1cBMi/30wvTY9Hhz Vnabe8eEBCQdeoB8dZ5J//MX5NT/NaFh07hrdJWL4DcCB/kHRrnE7prvwYWMra488r/R XA+XBfK30RJmQdNxBTakfN7G/Iyp9IOGZXEwCawJ4c1grmEENhplR8gafXse4uQZ9dl6 Er2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=9zqLCOJ4ewoiviLfM6ryhi20Tq4ElbjAhESukuweZ1M=; b=qoXPyOjR23jk42mjRriLIWT6ptM5ZtimItl1PYQ/YKpOUHjs8O1uwdHVe1yicg+I0q ORy1fjxvHkAL3SKqflp0wEioqegarVVVqPZ3ZDfgsUUmorjFvxzl/EpMU/UEUJVDh6rq DKh8UErgQHdvxrwbCbLuMm1rPRYEipXqWCR1LZ8R5aVEfreYHfh5YEE/afxecZqooJ27 9aycrqNoF/BYgrpGfhoYA6K7og1F91Ep32HwKlMcJlon6z+LbiwlzXmwRtCZZBzVggeS Gvm8v8DMq1rXYM+0Qv56ZV8o4z32LrKfBX4irRABebmVfpnddip/LJB10KYGvoJlLqQx UJJg== X-Gm-Message-State: APjAAAXGCQ4SdaGsu8Pom0LEkg/AkDWZKyj4RS5sEbNf3wT7JikfuFt4 kmNbektt0rAUTb6QyWLvDBLNeG+8uLQ= X-Google-Smtp-Source: APXvYqz+z2xjwL3cyBYFPvMZvpwB4x+2Tbryg7Yuo/CqAUwtgRUKSKQXoOt2M3cohE/gWdT3enUu0w== X-Received: by 2002:a63:3281:: with SMTP id y123mr9913954pgy.252.1572083094115; Sat, 26 Oct 2019 02:44:54 -0700 (PDT) Original-Received: from localhost ([2600:1700:7270:7d1f:fa59:71ff:fe00:10cc]) by smtp.gmail.com with ESMTPSA id r13sm5496033pfg.3.2019.10.26.02.44.52 for <37786@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2019 02:44:53 -0700 (PDT) In-Reply-To: (Robert Pluim's message of "Fri, 25 Oct 2019 18:32:39 +0200") 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:170184 Archived-At: Robert Pluim writes: >>>>>> On Tue, 22 Oct 2019 20:25:40 -0700, Allen Li said: > > Allen> I haven't touched xft-ignore-color-fonts (and it reproduces fr= om 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". Yep, this fixes the crash and I get the box with unicode codepoint inside. I don't know anything about fontconfig, so I can't comment on whether this is a fontconfig bug. > > 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;