Subject: bug#68940: 29.2; Random crashes in face for char / font

From: Robert Vojta <[email-masked]>
Date: Tue, 06 Feb 2024 22:59:23 +0100

> Yes, what's important is to see what is value of base_face at entry to
> face_for_font -- it sounds like that's an invalid face doer some
> reason.  Do you have any customizations of the fontsets?

No, no fontsets customizations.

This whole thing is getting weirder. I've recompiled Emacs w/ "-O0 -g3"
and two new things appeared:

1) Invalid read syntax: #

Warning (initialization): An error occurred while loading
‘/Users/zrzka/.emacs.d/init.el’

This is random as well, and it happens frequently (30% of Emacs
launches).

2) A new crash happened

It is hard to reproduce it in my "while true; lldb ...; done" loop with
this error (a lot of manual interventios required), but managed to
capture another backtrace:

https://gist.github.com/zrzka/7855634a46adeacb2fa7e8f861e39106

All this, purely random, undefined behavior?

Recompiled again, this time I've added "-fsanitize=address" (full flags
"-O0 -g3 -fsanitize=address"), and the first thing (Invalid read syntax
#) is gone. Leaving it running for the whole night, to see what's gonna
happen now.

If it won't reveal anything, I will switch back to "-O0 -g3", and will
start bisecting 29.1 -> 29.2 changes.