GNU bug report logs - #18004
export does not check that its arguments are symbols or pairs of symbols

Previous Next

Package: guile;

Reported by: Tobias Brandt <tob.brandt <at> gmail.com>

Date: Sat, 12 Jul 2014 17:21:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18004 in the body.
You can then email your comments to 18004 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#18004; Package guile. (Sat, 12 Jul 2014 17:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Brandt <tob.brandt <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 12 Jul 2014 17:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Brandt <tob.brandt <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: export does not check that its arguments are symbols or pairs of
 symbols
Date: Sat, 12 Jul 2014 16:59:01 +0200
[Message part 1 (text/plain, inline)]
Guile happily compiles the following module:

(define-module (test))
(define (foo) #t)
(export (foo))

This exports foo as (), because (foo) = (foo . ()) and export treats pairs
as renaming.

If you use this module, readline breaks because it looks up the module's
exported symbols and then tries to call (symbol->string '()):

scheme@(guile-user)> (use-modules (test))
scheme@(guile-user)> x<TAB>
While reading expression:
ERROR: In procedure symbol->string: Wrong type argument in position 1
(expecting symbol): ()
[Message part 2 (text/html, inline)]

Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Sun, 13 Jul 2014 13:39:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Brandt <tob.brandt <at> gmail.com>:
bug acknowledged by developer. (Sun, 13 Jul 2014 13:39:03 GMT) Full text and rfc822 format available.

Message #10 received at 18004-done <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Tobias Brandt <tob.brandt <at> gmail.com>
Cc: 18004-done <at> debbugs.gnu.org
Subject: Re: bug#18004: export does not check that its arguments are symbols
 or pairs of symbols
Date: Sun, 13 Jul 2014 09:37:16 -0400
Hi,

Tobias Brandt <tob.brandt <at> gmail.com> writes:
> Guile happily compiles the following module:
>
> (define-module (test))
> (define (foo) #t)
> (export (foo))
>
> This exports foo as (), because (foo) = (foo . ()) and export treats
> pairs as renaming.

This is already fixed in the latest release (2.0.11), commit
df3acd296e7149630fd6030aced6331ae6dd424b.

I'm closing this bug, but feel free to reopen if there's still a
problem.

      Thanks!
        Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Aug 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 316 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.