Subject: bug#66098: Crash in itree.c on macOS with incomplete backtrace

From: Robert Pluim <[email-masked]>
Date: Tue, 19 Sep 2023 11:23:36 +0200

>>>>> On Tue, 19 Sep 2023 01:47:41 -0700, Stefan Kangas <[email-masked]> said:

    Stefan> After rebuilding from master yesterday, I've started seeing frequent
    Stefan> crashes (several times a day) on macOS.  Thus, I re-built with all the
    Stefan> debug flags to investigate, and was able to get Emacs to crash almost
    Stefan> immediately after start, with the command `M-x notmuch'.

    Stefan> I'm not able to get much of a backtrace (see below).  Could it be that
    Stefan> the stack got corrupted somehow?  I've left the gdb session of the
    Stefan> crashed process open in case anyone has any ideas.  Is valgrind the best
    Stefan> tool for digging further, or are there any other tricks I can try?

Does valgrind run on macOS these days? Iʼd start by adding
'-fsanitize=address' to your CFLAGS.

(and I find lldb gives a better debugging experience than gdb on
macOS)

Robert
--