emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stack allocation of Lisp objects


From: Stefan Monnier
Subject: Stack allocation of Lisp objects
Date: Wed, 08 Oct 2014 23:11:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

I started seeing occasional crashes (always during temacs's dump so
far), and while they come&go, they are completely reproducible when
they're here.  So I dug into it, and it looks like a problem with stack
allocation:

The crash I analyzed was within mark_object while looking at a `cons'
whose cdr is nil and whose car is a string whose address is 0xffffcbe0
which IIUC is on the stack.

Apparently there's an AUTO_STRING somewhere which we stick into a heap
allocated cons cell.  So of course, when the GC gets around to scan this
cons object, the stack-allocated string is long gone and overwritten by
unrelated data => crash.


        Stefan "going back to USE_STACK_LISP_OBJECTS=false"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]