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#48732: 28.0.50; lisp_string_width segfaults on startup under macOS Date: Mon, 31 May 2021 19:25:01 +0300 Message-ID: <83v96y27mq.fsf@gnu.org> References: <83y2bx46xh.fsf@gnu.org> <243EB7FF-1A5B-4CAF-A50D-2FD31C34F6C6@yasufuku.dev> <83lf7w4nwc.fsf@gnu.org> <2BA01AE6-74E2-4597-B72A-4AF58335FA3B@yasufuku.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48732-done@debbugs.gnu.org To: Naofumi Yasufuku Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 31 18:26:11 2021 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 1lnkjy-0005QN-J4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 May 2021 18:26:10 +0200 Original-Received: from localhost ([::1]:39390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnkjx-0007LB-MC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 May 2021 12:26:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnkjq-0007JG-8P for bug-gnu-emacs@gnu.org; Mon, 31 May 2021 12:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51383) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnkjp-0003W6-W0 for bug-gnu-emacs@gnu.org; Mon, 31 May 2021 12:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnkjp-0006yp-T6 for bug-gnu-emacs@gnu.org; Mon, 31 May 2021 12:26:01 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 May 2021 16:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48732 X-GNU-PR-Package: emacs Mail-Followup-To: 48732@debbugs.gnu.org, eliz@gnu.org, naofumi@yasufuku.dev Original-Received: via spool by 48732-done@debbugs.gnu.org id=D48732.162247831726774 (code D ref 48732); Mon, 31 May 2021 16:26:01 +0000 Original-Received: (at 48732-done) by debbugs.gnu.org; 31 May 2021 16:25:17 +0000 Original-Received: from localhost ([127.0.0.1]:34695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnkj7-0006xm-Il for submit@debbugs.gnu.org; Mon, 31 May 2021 12:25:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnkj5-0006xV-DH for 48732-done@debbugs.gnu.org; Mon, 31 May 2021 12:25:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50532) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnkj0-00036L-1O; Mon, 31 May 2021 12:25:10 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1150 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 1lnkiz-00019B-Jg; Mon, 31 May 2021 12:25:09 -0400 In-Reply-To: (message from Naofumi Yasufuku on Mon, 31 May 2021 23:27:02 +0900) 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:207711 Archived-At: > From: Naofumi Yasufuku > Date: Mon, 31 May 2021 23:27:02 +0900 > Cc: 48732@debbugs.gnu.org > > This workaround works fine. I think this issue can be closed. > > Access to unrealized 'face->lface' Lisp_Object is not seen anymore > on startup, and no segfault happens with both simple reproducing > 'tramp-syntax’ init.el and my daily-use more complicated init.el. > > I comfirmed it on two intel macs which this segfault was observed: > - MacBook running the latest macOS 11.4 > - Mac mini running macOS 10.14 > > At the same time, font corruption issue with some themes is also disappeared > as Pankaj said on emacs-devel list. > (After autocmp string-width commits, I had seen the font corruption > issue frequently with doom-tomorrow-night of doom-themes package.) Thanks for testing. I think the problem was in styled_format: it keeps C pointers to Lisp string data around the call to lisp_string_width, which could cause GC, which could relocate Lisp strings. But after the last change, lisp_string_width as called from styled_format can no longer cause GC, so that problem is gone. And there are other valid reasons why 'format' and 'format-message' are better without this feature, so I think we will leave it at that.