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: rain1 <at> openmailbox.org
To: 20087 <at> debbugs.gnu.org
Subject: bug#20087: gensym
Date: Fri, 18 Mar 2016 17:03:27 +0000
[Message part 1 (text/plain, inline)]
Hello

I agree, this goes against the main assumption people have about gensym. 
I was able to reproduce the bug.

Here's a patch to libguile/symbol.c which fixes this behavior by 
incrementing the gensym counter in a loop until it creates a fresh 
symbol.
[guile-gensym-fix.diff (text/x-diff, attachment)]

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.