From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: bug#54188: Crash when eval-ing font test elisp code Date: Wed, 28 Aug 2024 15:29:11 +0000 Message-ID: <87frqozmww.fsf@protonmail.com> References: <86v7zkhlhl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22443"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Anand Tamariya Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 28 17:45:11 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 1sjKr9-0005bm-7m for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Aug 2024 17:45:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjKqN-0003OW-Rn; Wed, 28 Aug 2024 11:44:23 -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 1sjKbo-0003Oo-B4 for emacs-devel@gnu.org; Wed, 28 Aug 2024 11:29:20 -0400 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjKbl-0005ip-PQ for emacs-devel@gnu.org; Wed, 28 Aug 2024 11:29:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724858955; x=1725118155; bh=rOPDVkDH9WxPObFjJnbfqcuP+5IjwnOQJXAm9eYrO9s=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=fmn4bgnb0K0X3aHwL5/tLukjGjqU/CgUDjdR3G4e0yEkNznbHsuGU9YcECDmPO+M2 f/dIcJHvOaDpr0pJLWrXypTzzlf6tK3mp4XE9jhrk5zfbCTTLshhMoGDa0ldcB2Lhn uiQ9gzrbQaDqsqXPNk7gibXk3Mzp126wBWmXxXcOevdw95cTbI2+v46UgLmaL4rX+v mSWnBApSZT/Gg+Hn8mzSO7wJlvuLvp6VTZglEjr3ngjs2PCU/aewACVsHEahNIX6wD SvlHRInU9VsXDPGJ5CYdLEElMpZXpms12KttRphUHn7tYqTMkUqM6ti4fFOC1JG99H debUF01NdfHXQ== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 51d726d3cfcaab46f95c4e5a76f336414c124fff Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 28 Aug 2024 11:44:19 -0400 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:323154 Archived-At: "Anand Tamariya" writes: > On Wed, Aug 28, 2024 at 6:07=E2=80=AFPM Eli Zaretskii wrot= e: > > > From: Anand Tamariya > > Date: Wed, 28 Aug 2024 14:17:10 +0530 > >=20 > > Today I hit this bug. So I thought I'll provide some additional inputs= . > >=20 > > Some old fonts don't support non-ascii characters. In the sample, thes= e characters are 180, 166 and 216. > > When such a font is applied as :family attribute to the text, Emacs cr= ashes. > > Can you give examples of such fonts, and show a GDB C-level backtrace > from the crash? > > I always get the crash when I scroll to the next page after the page in t= he screenshot. I can't point out the specific font. So I have listed the po= ssible > fonts on the next screen. > > =20 > Stacktrace: > Thread 1 "temacs" received signal SIGSEGV, Segmentation fault. > 0x00005555557fceb1 in fontset_find_font (fontset=3Dfontset@entry=3D0x6c,= =20 > c=3Dc@entry=3D180, face=3Dface@entry=3D0x555559804320,=20 > charset_id=3Dcharset_id@entry=3D-1, fallback=3Dfallback@entry=3Dfalse= ) > at fontset.c:556 > 556 struct frame *f =3D (FRAMEP (FONTSET_FRAME (fontset)) > (gdb) bt > #0 0x00005555557fceb1 in fontset_find_font > (fontset=3Dfontset@entry=3D0x6c, c=3Dc@entry=3D180, face=3Dface@entry= =3D0x555559804320, charset_id=3Dcharset_id@entry=3D-1, > fallback=3Dfallback@entry=3Dfalse) at fontset.c:556 Can you print *face or "p face->fontset" and "p face->font"? I rather suspect face->fontset is -1, but face->font is non-NULL. That would make Vfontset_table a vector of 0x6c =3D 108 entries, which seems reasonable (it starts out at 32 entries, and larger_vector increases it to 48, then 72, then 108). 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. Thanks Pip