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#72692: Emacs 31.05 (40eecd594ac) get SIGSEGV on Linux (Linux 6.6.45 Kde Wayland) Date: Mon, 19 Aug 2024 17:17:24 +0300 Message-ID: <86a5h8y4uj.fsf@gnu.org> 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> <86plq5y6pq.fsf@gnu.org> <877ccdf3ks.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3321"; mail-complaints-to="usenet@ciao.gmane.io" Cc: execvy@gmail.com, 72692@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 19 16:20:52 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 1sg3Fc-0000iG-8f for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Aug 2024 16:20:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sg3FG-0005MG-Pv; Mon, 19 Aug 2024 10:20:31 -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 1sg3FA-0005IA-Tn for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2024 10:20:25 -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 1sg3F6-00015a-C2 for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2024 10:20:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ZXjXZeBV7OC5CBTkYZ0IGdrBynk+mkkwwiN3jWsg/YU=; b=SnQvUAfIMy0DPVVThr40GXlX9P2yPMtVHUXe3vdmTmC3149gC2erZ0P4kRfkNjbd/4NiUMWeTFZZbuV/Nd/9GeKBRJ53+6WWhN3io+Wwv9SSnWFBXa4ncv8oPnSIxnPsqUOu4sGBr7ADQIpRTGowH9R/kRzZ4tgFztCnjwdVb1TppGyAsZGwLZknIjucD25vnt4swUmm0YjpKuJ9k85EcNSTvB/Np4q2OXan94HFmrYuUkJwLXiypaZ1nw9TMZnlmu17CMFVyyG6dZ4TVaNHpYO3YOCwbAGwnopetXDZzWb9uGO4pwMFcGW/YTYGvoNOglz7deIp4vXhWHlPmR+jrg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sg3Fl-0005ri-T5 for bug-gnu-emacs@gnu.org; Mon, 19 Aug 2024 10:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Aug 2024 14:21: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.172407724622509 (code B ref 72692); Mon, 19 Aug 2024 14:21:01 +0000 Original-Received: (at 72692) by debbugs.gnu.org; 19 Aug 2024 14:20:46 +0000 Original-Received: from localhost ([127.0.0.1]:58895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sg3FV-0005qy-IS for submit@debbugs.gnu.org; Mon, 19 Aug 2024 10:20:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sg3FT-0005qj-Lh for 72692@debbugs.gnu.org; Mon, 19 Aug 2024 10:20:44 -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 1sg3Ca-0000dU-R6; Mon, 19 Aug 2024 10:17:44 -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=ZXjXZeBV7OC5CBTkYZ0IGdrBynk+mkkwwiN3jWsg/YU=; b=I0CBj9obC4Ie Z0awDtGl84LIfIdb5K0G8SPDzRuh/PO4sOA4rBE203/7nDAVlDyniAXbhDn974HmQtktTjK2Achcz 549+XUr6hC96jAkHO1QPFvkyUfX5LWWl52AShn2VOtzjmakJoZdPmkJ2ScvPHnHu78Mxh+DM3Zo6Q o1L9rQAIP31/5eLiytzW6bqySK5PI3Lu6dvvGjSB9Li/RLWNtvE41Kg3nLrK9QQ7680u5RORhnQyX aEV5iXXQaRGnTpUzzCIOFeeVhwnw+v/zSFMKJy25sxed4M1DMvdxIBWlxJcBDASWrXzzKRx8pGNRl uzT+H/iHR4uh6KzUZw3i2Q==; In-Reply-To: <877ccdf3ks.fsf@protonmail.com> (message from Pip Cet on Mon, 19 Aug 2024 06:07:35 +0000) 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:290393 Archived-At: > Date: Mon, 19 Aug 2024 06:07:35 +0000 > From: Pip Cet > Cc: execvy@gmail.com, 72692@debbugs.gnu.org > > "Eli Zaretskii" writes: > > > Where do you see this copying in realize_non_ascii_face? > > static struct face * > realize_non_ascii_face (struct frame *f, Lisp_Object font_object, > struct face *base_face) > { > struct face_cache *cache = FRAME_FACE_CACHE (f); > struct face *face; > > face = xmalloc (sizeof *face); > *face = *base_face; > ^____ here > > (The entire structure is copied, and fontset isn't explicitly changed > afterwards). I need new glasses. In any case, if you are right, and we free an ASCII face but leave its non-ASCII variants unchanged, we have a much deeper problem: a non-ASCII face is meaningless if its ASCII face was freed and re-realized, because the non-ASCII face needs to be re-realized as well. So if this happens, we need to understand how and plug that much worse problem. In the cases I was able to reproduce on my system, the call to realize_basic_faces was followed by setting the frame's 'face_change' flag, which causes the next redisplay free all the frame's faces and re-realize all of them. (But the alpha-background parameter is not supported here, so I needed to change other attributes.) As long as this happens before we try to display anything, the fact that we uncached the fontset will not cause any harm. IOW, the fact that the fontset was freed and uncached in itself is not a catastrophe, as long as the freed fontset is not accessed before it is regenerated. So can you show a backtrace from the call to free_realized_faces (supposedly called by realize_basic_faces?) which causes these printfs: > fontset 103 used for face 0x117cca0 > fontset 103 used for face 0x2a7a3c0 > fontset 103 used for face 0x117cca0 > fontset 103 used for face 0x2a62860 Also, could you add to the print-outs the pointer to the face's ascii_face, so that we see whether there's only one ASCII face involved here or more than one?