From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
Insert the following into /tmp/rec.el:
;; -*- lexical-binding: t; -*-
(require 'cl-lib)
(defun recurse (i g)
=C2=A0 (if (=3D i 0)
=C2=A0 =C2=A0 =C2=A0 (funcall g (cl-gensym))
=C2=A0 =C2=A0 (recurse (1- i) g)))
(recurse 100 (lambda (sym)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "outer= : %s" sym)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(mapbacktrace
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (_ _ args _= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (recurse 100= (lambda (sym)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "inner: %s %s&qu= ot; sym args)))))))
Then run
=C2=A0 emacs -Q -batch -l /tmp/rec.el
The printed messages will either be way too short, or Emacs will
segfault.=C2=A0 Re-running the command a couple of times consistently
generated a segfault for me.
My guess is that pdlvec got reallocated, but Fmapbacktrace uses pointers
instead of indices to access its element, so they pointers became
invalidated and point to garbage.