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.bugs Subject: bug#53924: 26.1; fontification sometimes fails for some characters despite available glyphs Date: Sun, 13 Feb 2022 13:53:27 +0200 Message-ID: <83k0dzq8y0.fsf@gnu.org> References: <838ruitqu9.fsf@gnu.org> <834k55ub5u.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31954"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53924@debbugs.gnu.org To: "Greg A. Woods" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 13 12:54:13 2022 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 1nJDSG-0008AG-UC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 12:54:13 +0100 Original-Received: from localhost ([::1]:59854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJDSF-00056d-GM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 06:54:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJDS7-00056F-8g for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 06:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJDS6-0004rO-M2 for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 06:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJDS6-0006C1-HM for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 06:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Feb 2022 11:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53924 X-GNU-PR-Package: emacs Original-Received: via spool by 53924-submit@debbugs.gnu.org id=B53924.164475322023773 (code B ref 53924); Sun, 13 Feb 2022 11:54:02 +0000 Original-Received: (at 53924) by debbugs.gnu.org; 13 Feb 2022 11:53:40 +0000 Original-Received: from localhost ([127.0.0.1]:36719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJDRj-0006BN-QT for submit@debbugs.gnu.org; Sun, 13 Feb 2022 06:53:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJDRg-0006B9-U4 for 53924@debbugs.gnu.org; Sun, 13 Feb 2022 06:53:38 -0500 Original-Received: from [2001:470:142:3::e] (port=34322 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJDRb-0004p0-9h; Sun, 13 Feb 2022 06:53:31 -0500 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=MTxyf5VN9TnGkoJTQ8EOS0pRl9Th8ky3kLcwVsk/fTk=; b=REb+ivfplSXV YY2e1bmkM3duwXXQJ+LhaY6A1jkxhy8hucLKiJNdB/CK9NqMtIJb7AQikxyMvH6nV9DbTYyO++Mvz xlHSbc2/q4oje4wmY4OMXjTt24FeSYZ9s/vglinI2RRu5+JLL9buJfN5NiiWp9bAMRZKqDclw51BA A0OwGOhDtlqgbxibxyrCFEYD4hIQMhWx+N3NDmNS+VikF9yRJspLAvOXA3IGRpFzLmoV0pMrOCaiH aWrFn0+ddq1ZC+iO5kih/QdX5LHSSl+0hLKTFFFYEoxTnISq6dGohcwUKN7aAhJfUGqzXzmSNPL6N 3iIHekrI75TP/RrMRv7Vyw==; Original-Received: from [87.69.77.57] (port=2090 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJDRa-0000Rl-QE; Sun, 13 Feb 2022 06:53:31 -0500 In-Reply-To: (woods@robohack.ca) 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" Xref: news.gmane.io gmane.emacs.bugs:226800 Archived-At: > Date: Sat, 12 Feb 2022 22:06:09 -0800 > From: "Greg A. Woods" > > First the ancient typo/bug: > > fontset.el contains an errant definition for xlfd-regexp-spacing-subnum > (with the value '8'). git-blame suggests this typo has lurked for 20 > years! > > It should of course be '9': > > (defconst xlfd-regexp-spacing-subnum 9) ; fix a 20-year-old typo! Thanks, fixed for the upcoming Emacs 28. Fortunately, this defconst were not used anywhere (which might explain how the typo survived for so long). > (font-families (cl-remove-duplicates > (sort (font-family-list) > (lambda(x y) (string> (upcase x) (upcase y)))) > :test 'cl-equalp))) This is not recommended as a way to get useful fonts. My suggestion is to use the following instead: (delete-dups (x-list-fonts "-*-*-medium-r-normal-*-*-*-*-*-*-iso10646-1" 'default (selected-frame))) Indeed, using x-list-fonts indiscriminately could very well include fonts that Emacs cannot use or even those which will crash Emacs. > Finally a crash (working on reproducing it with GDB in the source tree, > but my gdb is having trouble with the emacs .gdbinit): > > Reading symbols from /usr/pkg/bin/emacs-26.1... > [New process 12954] > [New process 1873] > Core was generated by `emacs'. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00007cdaa53676aa in _lwp_kill () from /usr/lib/libc.so.12 > [Current thread is 1 (process 12954)] > (gdb) bt > #0 0x00007cdaa53676aa in _lwp_kill () from /usr/lib/libc.so.12 > #1 0x00000000004dc6ac in terminate_due_to_signal (sig=sig@entry=11, > backtrace_limit=backtrace_limit@entry=40) at emacs.c:394 > #2 0x00000000004f2d13 in handle_fatal_signal (sig=sig@entry=11) at sysdep.c:1769 > #3 0x00000000004f2f53 in deliver_thread_signal (sig=sig@entry=11, > handler=0x4f2d05 ) at sysdep.c:1743 > #4 0x00000000004f2fa6 in deliver_fatal_thread_signal (sig=11) at sysdep.c:1781 > #5 handle_sigsegv (sig=11, siginfo=, arg=) > at sysdep.c:1866 > #6 > #7 0x00000000005ad68d in fontset_find_font (fontset=fontset@entry=364, c=c@entry=180, > face=face@entry=0x7cdaad2db4c0, charset_id=charset_id@entry=-1, > fallback=fallback@entry=false) at fontset.c:550 > #8 0x00000000005adfd3 in fontset_font (fontset=fontset@entry=364, c=c@entry=180, > face=face@entry=0x7cdaad2db4c0, id=-1) at fontset.c:760 > #9 0x00000000005ae365 in face_for_char (f=0x7cdaafbf2c30, > face=face@entry=0x7cdaad2db4c0, c=180, pos=, object=) > at fontset.c:990 > #10 0x000000000043e186 in FACE_FOR_CHAR (object=, pos=, > character=, face=0x7cdaad2db4c0, f=) > at dispextern.h:1818 > #11 get_next_display_element (it=it@entry=0x7f7fffe82f90) at xdisp.c:7303 > #12 0x000000000044790b in display_line (it=it@entry=0x7f7fffe82f90, > cursor_vpos=cursor_vpos@entry=0) at xdisp.c:21409 Is this with the above Lisp program that tries all the fonts collected by font-family-list, or is this with some other recipe to reproduce the crash? Also, was that in "emacs -Q"?