[plt-scheme] gc or string-append bug in mzscheme 301?

From: Keith Frost (keith.l.frost at gmail.com)
Date: Mon Jun 26 14:34:06 EDT 2006

The bug report tool seems like it isn't working for me.  Does it connect on
a different port than 80?  My firewall at work isn't friendly...

Anyway, I've managed to produce a test case which reliably fails to complete
on mzscheme 301, on both linux and windows, and thought I'd see if somebody
could verify whether this works on 350.

 (module test-case mzscheme

    (define (paste lst sep)
    ; Paste list of objects into a string,
    ; separated by sep
    (if (null? lst) ""
        (do ((str (format "~a" (car lst)))
             (l (cdr lst) (cdr l)))
          ((null? l) str)
          (set! str (string-append str (format "~a~a" sep (car l)))))))

  (define (upto n lst)
    (if (>= (car lst) n)
        (upto n (cons (+ (car lst) 1) lst)))))

;; From the above module, run

(paste (upto 10 '(1)) #\,)   ; =>  "10,9,8,7,6,5,4,3,2,1"

(paste (upto 100000 '(1)) #\,)  ;  The paste never returns?!

Posted on the users mailing list.