GNU bug report logs -
#20087
'gensym' is not guaranteed to return a fresh symbol
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Wed, 11 Mar 2015 17:16:02 UTC
Severity: normal
Done: Andy Wingo <wingo <at> pobox.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
‘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’.
This bug report was last modified 9 years and 30 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.