[Top][All Lists]

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

Re: readevalloop and GC

From: Stefan Monnier
Subject: Re: readevalloop and GC
Date: Wed, 16 Nov 2005 13:44:18 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> In readevalloop() in lread.c creates marker object in every turn
> of the loop when start is not nil, and the marker is not
> GC-protected.

Indeed and neither were `end' and `readfun' GC-protected.  I've installed
a patch to GCPRO them.  Thank you.

> So, it may be freed by GC happened in evalfun (is typically
> Feval) called just after.

Actually, in most configurations nowadays Emacs doesn't use GCPROs any more
but uses conservative stack scanning instead, so the problem is limited to
some particular (hopefully rare) configs.

> This problem was fixed by following patch.

I haven't installed the part of the patch which avoids the repeated creation
of a marker.  Seeing how the build_load_history call at the end
distinguishes ints from markers, I feel like this part of the code is buggy
(or else, lacks comments) anyway and I'll let someone else think about how it
should be fixed.


reply via email to

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