From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Seppo Ronkainen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63283: Emacs crash within fontset Date: Sat, 06 May 2023 22:36:35 +0000 Message-ID: References: <83wn1njswh.fsf@gnu.org> <835y95hicm.fsf@gnu.org> <7viubPQBitOqW2lvRK1P_aP6NjiS05pc86HGIH8yUyCZGabZgL5Hb3YAdm9efSCsxPb7yxW55zGhfZfE2PUjkZesUSharobfMDC3-JTEL1E=@protonmail.com> <835y95fe64.fsf@gnu.org> Reply-To: Seppo Ronkainen 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="2676"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63283@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 07 11:33:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pvalV-0000SV-Kj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 May 2023 11:33:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvalM-00012s-Q0; Sun, 07 May 2023 05:33:04 -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 1pvalK-00010h-Qj for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 05:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvalK-0001rq-IU for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 05:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvalK-0004RB-Ee for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 05:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Seppo Ronkainen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 May 2023 09:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63283 X-GNU-PR-Package: emacs Original-Received: via spool by 63283-submit@debbugs.gnu.org id=B63283.168345193716999 (code B ref 63283); Sun, 07 May 2023 09:33:02 +0000 Original-Received: (at 63283) by debbugs.gnu.org; 7 May 2023 09:32:17 +0000 Original-Received: from localhost ([127.0.0.1]:36431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvaka-0004Q1-W1 for submit@debbugs.gnu.org; Sun, 07 May 2023 05:32:17 -0400 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]:34773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvQWM-00027I-Fh for 63283@debbugs.gnu.org; Sat, 06 May 2023 18:36:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1683412608; x=1683671808; bh=8hk/0zJ/yVPjymTLMVwtTIQfTKdOTuwaX62dy8xf9sc=; 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=NBI8eDpRqeIHzfthA7jduOIy1ZUFNRDV77bkySA8kah5mmMRcKDpE/oE0HhTXt00h AyZ2r/ZMOe3m0OOjorZNoN5W4bhm3+T8srLqDsc2xzs1y4IQZzmeCKAednM2gHdYLb ELxhjau9z9oAW7i/Db3rfPzf8XKRDHAQXJD1U6Ryz4xGIdwY+UoTiXdrQAUVTyJQdU AMFd+J5PRELh/BAMRSeY4tJCTe5QHaWBugPb8jIbzsogDG3rx/cRz5lprD/T4rWrNG LflyJat7cahs4HdZ96+7ZvN8uJDBd142QpDVKin2rj4WVtLWFnW2uig4QLjvSGgDnT GgEyidctkPDFg== In-Reply-To: <835y95fe64.fsf@gnu.org> Feedback-ID: 7916417:user:proton X-Mailman-Approved-At: Sun, 07 May 2023 05:32:14 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261243 Archived-At: more data % gdb --args /home/user/.local/emacs-29.0.90_debug/inst/bin/emacs -Q ~/exam= plefilewithunicodetext GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/user/.local/emacs-29.0.90_debug/inst/bin/emacs..= . (gdb) source /home/user/.local/emacs-29.0.90_debug/cons/src/.gdbinit Warning: /home/user/../lwlib: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from te= rminal] DISPLAY =3D :0 TERM =3D xterm Breakpoint 1 at 0x205be8: file emacs.c, line 427. Breakpoint 2 at 0x1c4388: file xterm.c, line 26126. (gdb) run Starting program: /home/user/.local/emacs-29.0.90_debug/inst/bin/emacs -Q /= home/user/examplefilewithunicodetext [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". [New Thread 0x7ff4a8ee80 (LWP 52196)] (process:52189): Gtk-WARNING **: 21:29:18.069: Locale not supported by C li= brary. Using the fallback 'C' locale. [Detaching after vfork from child process 52197] [Detaching after vfork from child process 52198] [Detaching after vfork from child process 52199] fontset.c:970: Emacs fatal error: assertion failed: fontset_id_valid_p (fac= e->fontset) Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=3D6, backtr= ace_limit=3D2147483647) at emacs.c:427 427 signal (sig, SIG_DFL); (gdb) thread 1 [Switching to thread 1 (Thread 0x7ff5d6f700 (LWP 52189))] #0 terminate_due_to_signal (sig=3D6, backtrace_limit=3D2147483647) at emac= s.c:427 427 signal (sig, SIG_DFL); (gdb) bt 5 #0 terminate_due_to_signal (sig=3D6, backtrace_limit=3D2147483647) at emac= s.c:427 #1 0x000000555581ba04 in die (msg=3D0x55559f6900 "fontset_id_valid_p (face= ->fontset)", file=3D0x55559f6608 "fontset.c", line=3D970) at alloc.c:7707 #2 0x00000055559233c4 in face_for_char (f=3D0x55564c8470, face=3D0x5556292= b90, c=3D12302, pos=3D1, object=3DXIL(0)) at fontset.c:970 #3 0x00000055555bd308 in FACE_FOR_CHAR (f=3D0x55564c8470, face=3D0x5556292= b90, character=3D12302, pos=3D1, object=3DXIL(0)) at dispextern.h:1911 #4 0x00000055555dd054 in get_next_display_element (it=3D0x7fffff8a88) at x= disp.c:8184 (More stack frames follow...) Lisp Backtrace: "redisplay_internal (C function)" (0x0) (gdb) frame 2 #2 0x00000055559233c4 in face_for_char (f=3D0x55564c8470, face=3D0x5556292= b90, c=3D12302, pos=3D1, object=3DXIL(0)) at fontset.c:970 970 eassert (fontset_id_valid_p (face->fontset)); (gdb) info locals fontset =3D XIL(0) rfont_def =3D XIL(0x555605b2b8) charset =3D XIL(0x300effff7380) face_id =3D 85 id =3D 1432078920 (gdb) print font_driver_list $1 =3D (struct font_driver_list *) 0x55560d77e0 (gdb) print f->font_driver_list $2 =3D (struct font_driver_list *) 0x5556274ae0 (gdb) frame 3 #3 0x00000055555bd308 in FACE_FOR_CHAR (f=3D0x55564c8470, face=3D0x5556292= b90, character=3D12302, pos=3D1, object=3DXIL(0)) at dispextern.h:1911 (gdb) p face->font $5 =3D (struct font *) 0x0 (gdb) p face->fontset $6 =3D -1 (gdb) q if fontset carried -1 .. which in turn /home/user/.local/emacs-29.0.90_debug/cons/src/fontset.c:970 eassert (fontset_id_valid_p (face->fontset)); fontset =3D FONTSET_FROM_ID (face->fontset); eassert (!BASE_FONTSET_P (fontset)); /home/user/.local/emacs-29.0.90_debug/cons/src/fontset.c:176 static bool fontset_id_valid_p (int id) { return (id >=3D 0 && id < ASIZE (Vfontset_table) - 1); } relevant commit ? 3c0dda2663e38635163f0fd6c19748c6eba1c3c8 Avoid asserting for fontset validity before it is used Live long and prosper Sent with Proton Mail secure email. ------- Original Message ------- On Saturday, May 6th, 2023 at 7:32 PM, Eli Zaretskii wrote: > > Date: Sat, 06 May 2023 19:12:53 +0000 > > From: Seppo Ronkainen sodr80@protonmail.com > > Cc: 63283@debbugs.gnu.org > >=20 > > sure, here are captures of gdb and system-configuration-features from t= wo build variants of 29.0.90 and one 26.3 >=20 >=20 > Thanks. Please repeat this session again, and this time, when Emacs > aborts and GDB shows its prompt, do this: >=20 > (gdb) thread 1 > (gdb) pp fontset >=20 > If GDB says that it doesn't know the command "pp", type >=20 > (gdb) source /path/to/emacs/src/.gdbinit > (gdb) pp fontset >=20 > and post everything GDB prints after that. >=20 > And one more data point: in the same session do this: >=20 > (gdb) frame 2 > (gdb) print font_driver_list > (gdb) print f->font_driver_list >=20 >=20 > and show the values GDB prints.