GNU bug report logs - #20087
'gensym' is not guaranteed to return a fresh symbol

Previous Next

Package: guile;

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

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: ludo <at> gnu.org (Ludovic Courtès)
Subject: bug#20087: closed (Re: bug#20087: gensym)
Date: Thu, 23 Jun 2016 16:06:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#20087: 'gensym' is not guaranteed to return a fresh symbol

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 20087 <at> debbugs.gnu.org.

-- 
20087: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20087
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> pobox.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mark H Weaver <mhw <at> netris.org>, 20087-done <at> debbugs.gnu.org,
 rain1 <at> openmailbox.org
Subject: Re: bug#20087: gensym
Date: Thu, 23 Jun 2016 18:05:30 +0200
On Thu 23 Jun 2016 16:13, ludo <at> gnu.org (Ludovic Courtès) writes:

> Andy Wingo <wingo <at> pobox.com> 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

[Message part 3 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: bug-guile <at> gnu.org
Subject: 'gensym' is not guaranteed to return a fresh symbol
Date: Wed, 11 Mar 2015 18:15:02 +0100
‘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.