From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: harfbuzz 2f72162: Fix crash in the Cairo build Date: Fri, 14 Dec 2018 13:18:41 +0100 Message-ID: References: <20181214085417.15440.18845@vcs0.savannah.gnu.org> <20181214085418.6616820538@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544789833 24755 195.159.176.226 (14 Dec 2018 12:17:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2018 12:17:13 +0000 (UTC) Cc: Ari Roponen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 14 13:17:08 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXmOy-0006Jd-5R for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2018 13:17:08 +0100 Original-Received: from localhost ([::1]:33039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXmR4-0008LK-9L for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2018 07:19:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXmQa-00088A-4E for emacs-devel@gnu.org; Fri, 14 Dec 2018 07:18:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXmQX-0006VX-Cj for emacs-devel@gnu.org; Fri, 14 Dec 2018 07:18:48 -0500 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:38185) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXmQX-0006Uq-5C for emacs-devel@gnu.org; Fri, 14 Dec 2018 07:18:45 -0500 Original-Received: by mail-wm1-x332.google.com with SMTP id m22so5608960wml.3 for ; Fri, 14 Dec 2018 04:18:44 -0800 (PST) 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; bh=1xJCbgYlj9jxThP78BE0z4Oi8zwm1En60EfPKKrOWsU=; b=kA2gci1MYRmYqpM7XB2gB1tORjpKAlap8R/gYBJtvFpw6pfZnItQ5MzQXa2wAVzQOt /iR7VsAhNWdmQ4CEgYFbLFst/f1spRrLAKRRKsc4iA7VlA/dvgpwxpu6npuWpvu2gesi TXPkcmS+H7rUr6qJWCdfI1Ckz8gIAFd+3PD3S1/r4WBGrP12vEMoqJn9UYvDclBbk2VH YaV0X84HL29fQCedoVw9vReyGDXgyghUlaHhvQOxc+C87oXgeXFWYZ8lELvByOJxlQif Ri0nNA9gmnfPxJd4Ih3hVz2YMIdSPusXvGWLHTUZjt04u+a5ny8kLh4RdKxuXPRJ/2Md trRA== 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; bh=1xJCbgYlj9jxThP78BE0z4Oi8zwm1En60EfPKKrOWsU=; b=M2UYj1MZRgLZiTE2dc3u9Rss+bK1kDLFcHPzfYMc/pg62LIztegGrr2Y/dkiHHY1H+ C93wILKGdmH0kSZDcU1IBWk+IGaXtgY95MXEABbbO5OOCmgjn/MDXf2zM5dcMUwInAWL 91XLhl/tO+4XF7L0zSiIXE8gTvrt8KqeffMVjSf0DPRvr0HLEKxT9QA4z+reVpFj/9M3 Ixq4BLilHv72B86gHqq+TGoDVL4v9lDFktFw+6A5fOUzTGn3EIcgfq42kDbXidvmS8um 7OBdO2z1ApU8wQrZ3lR9Xydxg8NW7n6oIS1o1BsVOvK61NNkKN9VPPpkVlayy1FDsaVu +4Wg== X-Gm-Message-State: AA+aEWZs9h4fDr6B//Os9L4UgOzpyl+y14p+0KkdLV6thh1FdTBJJaRn XqYtD84y94HoQqfka2qN7Tk= X-Google-Smtp-Source: AFSGD/XhkAs1BnIqJmVAhCCP1o6zRinrm3P+ztuHizpmQ4qGQeThlKp/y52t5IjW3FUZkgrmOLkYiw== X-Received: by 2002:a1c:2884:: with SMTP id o126mr3179240wmo.17.1544789923615; Fri, 14 Dec 2018 04:18:43 -0800 (PST) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id z17sm4733553wrv.2.2018.12.14.04.18.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Dec 2018 04:18:42 -0800 (PST) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <20181214085418.6616820538@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Fri, 14 Dec 2018 03:54:18 -0500 (EST)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231828 Archived-At: eliz@gnu.org (Eli Zaretskii) writes: > diff --git a/src/ftcrfont.c b/src/ftcrfont.c > index e2f84d4..6d74d93 100644 > --- a/src/ftcrfont.c > +++ b/src/ftcrfont.c > @@ -41,6 +41,9 @@ struct ftcrfont_info > bool maybe_otf; /* Flag to tell if this may be OTF or not. */ > OTF *otf; > #endif /* HAVE_LIBOTF */ > +#ifdef HAVE_HARFBUZZ > + hb_font_t *hb_font; > +#endif /* HAVE_HARFBUZZ */ > FT_Size ft_size; > int index; > FT_Matrix matrix; Eli, what would be your preferred type of solution to avoid this in future? A #define of the common portion of the structs in ftfont.h? An embedded 'struct ft_font_fixed' member inside struct ft{,cr}font_info? Something else? At the very least I propose syncing the comments: diff --git i/src/ftcrfont.c w/src/ftcrfont.c index e2f84d44fc..7d63a344ec 100644 --- i/src/ftcrfont.c +++ w/src/ftcrfont.c @@ -35,12 +35,16 @@ along with GNU Emacs. If not, see . */ struct ftcrfont_info { struct font font; - /* The following six members must be here in this order to be - compatible with struct ftfont_info (in ftfont.c). */ + /* The following members up to and including 'matrix' must be here + in this order to be compatible with struct ftfont_info (in + ftfont.c). */ #ifdef HAVE_LIBOTF bool maybe_otf; /* Flag to tell if this may be OTF or not. */ OTF *otf; #endif /* HAVE_LIBOTF */ +#ifdef HAVE_HARFBUZZ + hb_font_t *hb_font; +#endif /* HAVE_HARFBUZZ */ FT_Size ft_size; int index; FT_Matrix matrix; diff --git i/src/ftfont.c w/src/ftfont.c index a645bbf029..ef4ccab3ec 100644 --- i/src/ftfont.c +++ w/src/ftfont.c @@ -56,8 +56,9 @@ struct ftfont_info { struct font font; #ifdef HAVE_LIBOTF - /* The following four members must be here in this order to be - compatible with struct xftfont_info (in xftfont.c). */ + /* The following members up to and including 'matrix' must be here in + this order to be compatible with struct xftfont_info (in + xftfont.c). */ bool maybe_otf; /* Flag to tell if this may be OTF or not. */ OTF *otf; #endif /* HAVE_LIBOTF */