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

From: Stefan Kangas <[email-masked]>
Date: Fri, 22 Sep 2023 03:58:13 -0700

Robert Pluim <[email-masked]> writes:

> Does valgrind run on macOS these days?

It seems like it doesn't, but there is a patched version that some users
have reported works for them:

    https://github.com/LouisBrunner/valgrind-macos

I didn't try it, as it feels iffy to install stuff from random GitHub
repositories, and I don't have a macOS VM to play with.

> Iʼd start by adding '-fsanitize=address' to your CFLAGS.

I tried that, and the crash disappeared.  Nothing has come up so far,
not even the bug that you found.

However, I had to install a new version of llvm to get asan support, and
it seems the new build is using my old clang but CPPFLAGS and LDFLAGS is
pointing to the new version.  Perhaps that has something to do with it,
so I'll try rebuilding without that next.

This is the new build:

Configured using:
 'configure 'CFLAGS=-O0 -g3 -fsanitize=address'
 CPPFLAGS=-I/usr/local/opt/llvm/include
 LDFLAGS=-L/usr/local/opt/llvm/lib'

The old one had:

Configured using:
 'configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
 'CFLAGS=-O0 -g3''