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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 07 Feb 2024 14:32:18 +0200

> From: Robert Vojta <[email-masked]>
> Cc: [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: #

Did you clean up the source tree before rebuilding?  At least
"make distclean" is needed.

> 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).

Did you try --debug-init?

> 
> 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?

I don't see why it could be undefined.  It seems to indicate that
c_strcasecmp crashes comparing an empty string, which is something it
is supposed to be able to handle.

I'm beginning to suspect some problem with your compiler or maybe even
with hardware (like some memory chip?).