unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Endless loop in guile 1.6.1 if using macros
@ 2003-01-18 12:41 Christian Neukirchen
  2003-01-18 14:42 ` Mikael Djurfeldt
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Neukirchen @ 2003-01-18 12:41 UTC (permalink / raw)


Hello,

The following program will make guile 1.6.1 enter an endless loop
while garbage collecting.

Put this into `module.scm':

  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (define-module (module)
    :use-syntax (ice-9 syncase))
  
  (export f)
  
  (define-syntax ds
    (syntax-rules ()
      ((ds a) (string-append a " (by define-syntax)\n"))))
  
  (define (f)
    (display "In F.\n")
    (display (ds "In F")))
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

And this into `main.scm':

  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (use-modules (module))
  (f)
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If you run this now:

  $ guile -s main.scm
  In F.
               <-- Endless loop!

However, if you change the

  (export f)

into
  
  (export f ds)

everything works correctly!

  $ guile -s main.scm
  In F.
  In F (by define-syntax)

Therefore I think, all macros used by exported guile functions have to
get exported too.

This bug seems to appear in guile 1.6 only, since I talked to the mixp
developer, he uses guile 1.7 and can't reproduce it.

If you have patches, could you please CC: them to me?

Happy hacking,
  Christian Neukirchen <chneukirchen@yahoo.de>


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


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

end of thread, other threads:[~2003-01-18 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-18 12:41 Endless loop in guile 1.6.1 if using macros Christian Neukirchen
2003-01-18 14:42 ` Mikael Djurfeldt

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).