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: Tue, 27 Aug 2024 14:47:08 +0300 Message-ID: <86zfoyi3wj.fsf@gnu.org> References: <8b1c8e1f-e0b9-4049-888c-3f723e0008a9@gmail.com> <86wmkcwj9c.fsf@gnu.org> <867cc6nv7u.fsf@gnu.org> <87v7zq5jap.fsf@protonmail.com> <86v7zqmdo5.fsf@gnu.org> <86bk1gxz1z.fsf@mail.linkov.net> <86v7zojuqw.fsf@gnu.org> <87y14j25mg.fsf@protonmail.com> <86cylvjw5l.fsf@gnu.org> <87r0ab14ye.fsf@protonmail.com> <87mskz146e.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37701"; mail-complaints-to="usenet@ciao.gmane.io" Cc: execvy@gmail.com, 72692@debbugs.gnu.org, juri@linkov.net To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 27 13:48:22 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 1siugP-0009d2-KD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Aug 2024 13:48:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1siugF-0000VO-Sn; Tue, 27 Aug 2024 07:48:11 -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 1siugE-0000O8-H7 for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 07:48:10 -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 1siugE-0003AW-6M for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 07:48:10 -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=Fyu6hwNU0Jlh0IQEn58Ky7BW667aKXExvAfn693GU1w=; b=LG3ipJGeUhQTo9AygdHvkLI5cNQLXsCVsZ3hmegcsZHoBkmuKwd0PEJ5MweHkBislSFrN+BoRvCrlcEo9yFFZFe8yNCWL26Gnxw00zUq8xOLvUjbE0ws3XOw4CgT/+b/JnV00mp6XWwI+RUX6LClKXoYJHpJ9oj8HtDjYKWq80P+A/e9FB382qO/yDG+/UTYXWreYC2KfjvgbEqmPqCZkXhrMmVnyNtmGYQkld+hlyutQ0XenRwxcfrYBoMWwATO2NCv05xpTapMJyITfmzqRTkWiHVzBFllWyL7sAy9XzQzBu1Rma059ct1+vDwEKDfITOuPOgSrRGqt9V711ExlQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1siuh4-0000mS-Ma for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 07:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2024 11:49:02 +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.17247592982934 (code B ref 72692); Tue, 27 Aug 2024 11:49:02 +0000 Original-Received: (at 72692) by debbugs.gnu.org; 27 Aug 2024 11:48:18 +0000 Original-Received: from localhost ([127.0.0.1]:46156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siugL-0000lG-N6 for submit@debbugs.gnu.org; Tue, 27 Aug 2024 07:48:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siugK-0000l3-D3 for 72692@debbugs.gnu.org; Tue, 27 Aug 2024 07:48:17 -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 1siufN-00036t-MT; Tue, 27 Aug 2024 07:47:17 -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=Fyu6hwNU0Jlh0IQEn58Ky7BW667aKXExvAfn693GU1w=; b=DukuHFn91H3h 3N0iIthuF7/AAcm4C80dbQ97SePVwZRipktSHeA869eFEI9C5OWXaP4cv0eOks8B1XMGxRIApyI9y Xn81U68pKcfcOnw6gNx+DKR/bvvHDwkECJhU0oMqrQ0xNptVJRr1wiy2+gaIQN/y4V7M17w8b6H9y YXcDujjOHjrtffYvMFKmkcMbHD3rH3PBR+dcDVF5WX9rr1Z3i6baCw3IC85o2V628mJQ9n1FKmU4f 7hWh9SKnYT9hpc4o9pRnPK2goW1Emqxl/px6YehXFDreaJzACxnIHZL2u9GTgIKVG243hpHIOxy/N roSMTTF2HyzjFKch/psQ+w==; In-Reply-To: <87mskz146e.fsf@protonmail.com> (message from Pip Cet on Mon, 26 Aug 2024 19:20:59 +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:290813 Archived-At: > Date: Mon, 26 Aug 2024 19:20:59 +0000 > From: Pip Cet > Cc: execvy@gmail.com, 72692@debbugs.gnu.org, juri@linkov.net > > That was quick. With this patch: > > diff --git a/src/fontset.c b/src/fontset.c > index 16d14669c89..41d845c9bc5 100644 > --- a/src/fontset.c > +++ b/src/fontset.c > @@ -921,8 +921,6 @@ free_face_fontset (struct frame *f, struct face *face) > eassert (! BASE_FONTSET_P (fontset)); > eassert (f == XFRAME (FONTSET_FRAME (fontset))); > ASET (Vfontset_table, face->fontset, Qnil); > - if (face->fontset < next_fontset_id) > - next_fontset_id = face->fontset; > if (! NILP (FONTSET_DEFAULT (fontset))) > { > int id = XFIXNUM (FONTSET_ID (FONTSET_DEFAULT (fontset))); > @@ -931,8 +929,6 @@ free_face_fontset (struct frame *f, struct face *face) > eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset)); > eassert (f == XFRAME (FONTSET_FRAME (fontset))); > ASET (Vfontset_table, id, Qnil); > - if (id < next_fontset_id) > - next_fontset_id = face->fontset; > } > face->fontset = -1; > } > diff --git a/src/xfaces.c b/src/xfaces.c > index 684b6ccfac7..02fc934ee4d 100644 > --- a/src/xfaces.c > +++ b/src/xfaces.c > @@ -733,9 +733,12 @@ recompute_basic_faces (struct frame *f) > { > if (FRAME_FACE_CACHE (f)) > { > + bool was_empty = FRAME_FACE_CACHE (f)->used == 0; > clear_face_cache (false); > if (!realize_basic_faces (f)) > emacs_abort (); > + if (!was_empty) > + f->face_change = true; > } > } > > > and this hibiscus.el: > > (while t > (insert (concat (make-string 1 (floor (random 132000))))) > (set-frame-parameter nil 'alpha-background 1.0) > (sit-for 1.0)) > > emacs -Q --load hibiscus.el works. Without the last hunk, it segfaults > almost immediately. > > And the patch makes sense, too: if the face cache was empty, there's no > need to set f->face_change to true. That was the main idea of the patch I proposed, except that avoiding to set the face_change flag when all we have in the cache are the basic faces is a bit stronger, no? > Is that case sufficiently common to result in acceptable > performance? Which case?