emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Unicode Lisp reader escapes


From: Stefan Monnier
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Mon, 08 May 2006 11:32:48 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> > In the calling sequence of
>> > Fread-> read_internal_start->read0->read1, I see no place
>> > where the original `tem' is GCPROed.  Do I overlook
>> > something?
>> 
>> Why would it need to be protected? it's not used afterwards.

> It can theoretically disappear in the middle of being used. With my patch,
> if the string consisted of "\u20AC one two", Lisp will be called, the
> garbage collector may be invoked, and the string overwritten, since to the
> GC it’s not in use. Then the READCHAR -> retry loop may end up reading
> incorrect data. 

That's of not concern to Fcall_interactively.  It's Fread should GCPRO its
argument when needed.  So it seems the bug is that read_internal_start calls
read0 (which can GC) and uses `stream' afterwards without having GCPRO'd it.


        Stefan




reply via email to

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