guile-devel
[Top][All Lists]
Advanced

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

Re: Unsafe psyntax label generation


From: Andy Wingo
Subject: Re: Unsafe psyntax label generation
Date: Thu, 26 Jan 2012 12:26:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Heya Mark,

On Wed 25 Jan 2012 02:41, Mark H Weaver <address@hidden> writes:

>> On Tue 24 Jan 2012 15:01, Mark H Weaver <address@hidden> writes:
>>
>>> `local-eval' combines syntax objects from two different sessions into a
>>> single syntax object (in the wrapper procedure), and thus there may be
>>> label name collisions.  Now, if this combined syntax object is
>>> serialized as a compiled procedure, these labels with the same name will
>>> be optimized together into the same string object!
>>
> How would you like to fix this?  Would you like me to make a new
> procedure that creates a universally-unique string?  Most of `gensym's
> current code would be moved to that new procedure, and then `gensym'
> would use it.

I effectively did that: both marks and labels are now globally unique.

At some point though, I realized that not all gensyms need to be
globally unique.  For example, the gensyms used in Tree-IL only need to
be unique within a session.  So in the end I reverted your gensym patch,
and reworked some pieces of it to provide a "session identifier" to the
expander, which is included in generated symbols and strings that need
to be unique across sessions.  The procedure that provides this
identifier then gets shunted off into the (system syntax) toolshed after
boot.

Comments very much welcome, and thanks again for working on this
problem.

Andy
-- 
http://wingolog.org/



reply via email to

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