unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#20087: 'gensym' is not guaranteed to return a fresh symbol
@ 2015-03-11 17:15 Ludovic Courtès
  2016-03-18 17:03 ` bug#20087: gensym rain1
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2015-03-11 17:15 UTC (permalink / raw)
  To: 20087

‘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’.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-06-23 16:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 17:15 bug#20087: 'gensym' is not guaranteed to return a fresh symbol Ludovic Courtès
2016-03-18 17:03 ` bug#20087: gensym rain1
2016-03-22  5:24   ` Mark H Weaver
2016-03-22  7:58     ` Ludovic Courtès
2016-03-23 17:55       ` Mark H Weaver
2016-03-24  8:45         ` Ludovic Courtès
2016-06-23 13:48           ` Andy Wingo
2016-06-23 14:13             ` Ludovic Courtès
2016-06-23 16:05               ` Andy Wingo
2016-03-22 11:21     ` rain1
2016-03-22 18:06       ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).