[gambit-list] non-tail recursion segfaults

Phil Dawes pdawes at users.sf.net
Mon Apr 2 10:54:37 EDT 2007


Hi Gambit list,

I've started getting segmentation faults whenever I compile 
srfi-1.scm[1] and use it within my program and was wondering if it was 
to do with non-tail recursion.

I did a quick experiment and found that on my machine the following code 
compiled with gsc segfaults when i is just 20000 (it works fine 
interpreted):

--------------

(define (loop i)
   (if (zero? i)
       '()
       (cons i (loop (- i 1)))))

(loop 20000)

--------------

This seems quite limiting - is there flag I can tweak to improve this?

Many thanks,

Phil

[1] 
https://webmail.iro.umontreal.ca/pipermail/gambit-list/2005-March/000168.html




More information about the Gambit-list mailing list