[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20087: 'gensym' is not guaranteed to return a fresh symbol
From: |
Ludovic Courtès |
Subject: |
bug#20087: '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’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#20087: 'gensym' is not guaranteed to return a fresh symbol,
Ludovic Courtès <=