From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72692: Emacs 31.05 (40eecd594ac) get SIGSEGV on Linux (Linux 6.6.45 Kde Wayland) Date: Sun, 18 Aug 2024 16:08:39 +0000 Message-ID: <87ttfhg6ey.fsf@protonmail.com> References: <8b1c8e1f-e0b9-4049-888c-3f723e0008a9@gmail.com> <87h6bigoo5.fsf@protonmail.com> <7be3359e-4389-4bc6-bf98-b46a2a8a711c@gmail.com> <877ccegfxj.fsf@protonmail.com> <86h6biymv4.fsf@gnu.org> <8734n2gd2x.fsf@protonmail.com> <86cym5zzq9.fsf@gnu.org> <87y14tg9ln.fsf@protonmail.com> <865xrxzvrt.fsf@gnu.org> Reply-To: Pip Cet 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="14189"; mail-complaints-to="usenet@ciao.gmane.io" Cc: execvy@gmail.com, 72692@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 18 18:09:46 2024 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 1sfiTR-0003YL-LB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Aug 2024 18:09:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfiT7-0004dv-3d; Sun, 18 Aug 2024 12:09:25 -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 1sfiT3-0004de-Uu for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 12:09:23 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfiT3-0002TC-M6 for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 12:09:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=2C4ZcZ+dvHjtzJn0fzsfnJS5ksalZb9dIIX1meAIJ+c=; b=otK9/AzKc+ZLsdqys6RoLzMpe1DrsDYcq0X54Y6MY/8+qiD84EfsCSbS164Qe9WPT5/vglNX5Qv+0fXqek3M2GZhy1P1EsUxYbps2zMv12VxbdzGyfIqkXROy/jYb903Soz7nNceMFzVM3vyOnR2kK9hnzLgdFtykGY80RGHKXstvrqlfQ/Rx3A3imxmemY631Xl10BPpUtFQHXD8+7ql0eNOIeloBZRATyPkzH0jDHZrCa4D6VI7G8QjPV+FtLv0PCKF08Bt/wh5DQaygAmvTBjX9CSTVuvYAJQCexTfJ0jVq1EyYW4RCOB/MAWKOh00c8NWhqlfe/wx4IZRv+glQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfiTh-0002dk-PH for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 12:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Aug 2024 16:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72692 X-GNU-PR-Package: emacs Original-Received: via spool by 72692-submit@debbugs.gnu.org id=B72692.172399737110102 (code B ref 72692); Sun, 18 Aug 2024 16:10:01 +0000 Original-Received: (at 72692) by debbugs.gnu.org; 18 Aug 2024 16:09:31 +0000 Original-Received: from localhost ([127.0.0.1]:56533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfiTD-0002cs-Do for submit@debbugs.gnu.org; Sun, 18 Aug 2024 12:09:31 -0400 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]:35661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfiTB-0002cd-Um for 72692@debbugs.gnu.org; Sun, 18 Aug 2024 12:09:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1723997322; x=1724256522; bh=2C4ZcZ+dvHjtzJn0fzsfnJS5ksalZb9dIIX1meAIJ+c=; 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=hsDz8IP6TseEzH+rlqeSLMHUvC2Ei6a8x7jk1PtBLnY+2SEHlbFm1iE1f74kdcCBt E2ZG/SunNoz2fcd/1s7Joyng9smugyoDdMXGRF8uWWA5rON6uITc3wJTqMDlPzhGI6 YZKL+CUamfUlwkHYfnD9K5f2rjAaxkoROp63QajEC0yk0mMn17sAU5s9UNSPEEgrfr zgnJCNGPxW0wFLX/NIHUHl8NdEG1y5WHBzgLMq7my8FKFgQUtei5RpFbb3/Up5ipSE s7zTKiEqAmJF5/GC5v9FAqgfWzENS9ZVwN06A15CkK5S0MGaJXNOqdNxqBNjbfad2A V4ST/PWeoe/gg== In-Reply-To: <865xrxzvrt.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 55e8d75bdc7dd40da76af43b44e06fc3ba13e2ae 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:290332 Archived-At: "Eli Zaretskii" writes: >> Date: Sun, 18 Aug 2024 14:59:51 +0000 >> From: Pip Cet >> Cc: execvy@gmail.com, 72692@debbugs.gnu.org >> >> I don't understand yet what underlying assumption is violated, and what >> precisely happened. >> >> But I have just reproduced the crash, I think. It does need this patch, >> which means we will actually crash when accessing a formerly-valid >> fontset, rather than accessing random and inappropriate data, so I think >> we need to first establish that this patch doesn't break things and >> cause a different crash. > > I don't understand: is this patch needed to trigger a crash, or are > you saying we need it to fix crashes? It helps trigger the crash, which might take a long time without the patch. > next_fontset_id is used to assign an ID to the next fontset we create, > AFAIK. Indeed, and if we never reset it to a low value, we won't reuse slots in Vfontset_table. So the entries, rather than containing a different and incorrect fontset for our font, will remain zeroed. >> > A "non-ASCII face" is basically >> > the same face as its "ASCII face" counterpart, it just uses a >> > different font. An example would be some well-known face, like 'bold' >> > or 'variable-pitch' or 'region' -- when we need to display a non-ASCII >> > character in this face, and the "ASCII face"s font doesn't support the >> > character, we internally create a new face that uses the same fontset >> > as the "ASCII face". This new face basically shadows the "ASCII face" >> > (and is never exposed to Lisp) and is for every practical purpose an >> > integral part of that "ASCII face" -- they always go together. >> >> Except they're not freed together? > > How do you see that? printf debugging. >> >> I meant "face", sorry! The non-ASCII face remains in the font cache, >> >> and its fontset is set to the newly freed fontset's ID, which is like= ly >> >> soon to be reused; only if it isn't, we see a crash. >> > >> > That shouldn't happen, AFAIU, except for very brief periods of time, >> > since we free the cached faces one by one, see free_realized_faces. >> >> Again, not what I'm seeing, because 'free_realized_faces' isn't where th= e >> font is actually removed from the cache; it's 'free_realized_face'. > > Yes, but free_realized_faces calls free_realized_face, no? Yes, it does, but in my case, 'free_realized_face' is called by 'realize_face', and 'free_realized_faces' isn't. I'll continue debugging this, but if there are any questions or further helpful information, that would be much appreciated. Pip