Subject: bug#44968: 28.0.50; [feature/native-comp] Emacs segfault in `rustic-flycheck-dirs-list'

From: Andrea Corallo <[email-masked]>
Date: Tue, 01 Dec 2020 09:14:35 +0000

"Gerry Agbobada" <[email-masked]> writes:

> Thanks for the help, I’ll look at the commit to see if I understand something :)

Dumping Limple (setf comp-verbose 3) we can see how the call to `car'
as:

(call car #s(comp-mvar (cons) (nil) nil 15178090 6))

(cons) is the typeset slot of the mvar, (nil) is the valset.
This implies the the mvar may be during execution *or* a cons *or*
assume value nil.

Hence the fix to `comp-mvar-cons-p' in the commit.

Without this `comp-mvar-cons-p' was returning t and the backend was
erroneously generating code on this false assumption.  Indeed at the
first iteration of your reproducer the argument of car is nil and not a
cons, and so the crash.

  Andrea