--- Begin Message ---
Subject: |
'gensym' is not guaranteed to return a fresh symbol |
Date: |
Wed, 11 Mar 2015 18:15:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
‘gensym’ returns interned symbols, but the algorithm to determine the
new symbol is simplistic and predictable.
Thus, one can arrange to produce a symbol before ‘gensym’ does, leading
‘gensym’ to return a symbol that’s not fresh (in terms of ‘eq?’), as is
the case with the second call to ‘gensym’ here:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (gensym "x")
$1 = x379
scheme@(guile-user)> 'x405
$2 = x405
scheme@(guile-user)> (gensym "x")
$3 = x405
--8<---------------cut here---------------end--------------->8---
Should we worry about it? I think it may have hard to anticipate
security implications.
Ludo’.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#20087: gensym |
Date: |
Thu, 23 Jun 2016 18:05:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
On Thu 23 Jun 2016 16:13, address@hidden (Ludovic Courtès) writes:
> Andy Wingo <address@hidden> skribis:
>
>> I just pushed something to master to error when serializing an
>> uninterned symbol. Otherwise compiling an uninterned symbol effectively
>> interns it! I am not sure that we can apply such a fix in 2.0 though as
>> who knows, maybe someone is compiling something with symbols made with
>> make-symbol. WDYT? If you agree we can close this bug.
>
> That makes sense to me.
Closing then. Thanks for the review :)
Andy
--- End Message ---