From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#54188: Crash when eval-ing font test elisp code Date: Wed, 28 Aug 2024 18:54:11 +0300 Message-ID: <86o75chcd8.fsf@gnu.org> References: <86v7zkhlhl.fsf@gnu.org> <87frqozmww.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: atamariya@gmail.com, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 28 17:54:41 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sjL0K-0005r2-68 for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Aug 2024 17:54:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjKzw-000240-S3; Wed, 28 Aug 2024 11:54:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjKzw-00023r-4E for emacs-devel@gnu.org; Wed, 28 Aug 2024 11:54:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjKzv-00009t-6x; Wed, 28 Aug 2024 11:54:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=E9bM4/iFA4+g/kpQVb8Gaccv9/Stt8Ro9JIUj92b4ug=; b=amI0jCiO38Td BtJnO4lmYMyj1cAOydztpsv2iOXkqblBFC/1Q0hNrvpEoq10OEgznGWTkD9Xpz5VzJDVGYSJQe1uX RNj04/rAVVxUS8yu0rnM1wirz3gsMAKftEo+3n7LbfrFjXNwR/hWGzA+1ni3FpNjfU+7ObmFfWxa3 /PGtUQrCObTkrIpYKNIPH/AkPXizUfj2BqMDqDt5Qo9uIabCoDqjSV24azRot1tDJxqOxeaq6/Och TQsf3cr6qBxvKpPxYdcGcxzzMPnTWdQl+leUndMB9jlkraCVxVyfA5rRC5vVMgD2+onJ/o75p3rU3 6VNiwtdH9NO1OmFW7nj7hA==; In-Reply-To: <87frqozmww.fsf@protonmail.com> (message from Pip Cet on Wed, 28 Aug 2024 15:29:11 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323156 Archived-At: > Date: Wed, 28 Aug 2024 15:29:11 +0000 > From: Pip Cet > Cc: Eli Zaretskii , emacs-devel@gnu.org > > This code in fontset.c: > > /* If the parent face has no fontset we could work with, and has no > font, just return that same face, so that the caller will > consider the character to have no font capable of displaying it, > and display it as "glyphless". That is certainly better than > violating the assertion below or crashing when assertions are not > compiled in. */ > if (face->fontset < 0 && !face->font) > return face->id; > > would leave face->fontset at -1 and try to dereference it if face->font > is non-NULL, and I don't understand why. I didn't yet review the relevant code, but AFAIR face->fontset = -1 means the face has no fontset, and I think I saw in xfaces.c code which handles that.