[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48732: 28.0.50; lisp_string_width segfaults on startup under macOS
From: |
Eli Zaretskii |
Subject: |
bug#48732: 28.0.50; lisp_string_width segfaults on startup under macOS |
Date: |
Mon, 31 May 2021 19:25:01 +0300 |
> From: Naofumi Yasufuku <naofumi@yasufuku.dev>
> 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.