unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* stack overflow problem
@ 2006-02-04 10:54 William Xu
  2006-02-04 23:03 ` Chusslove Illich
  2006-02-05  1:18 ` Stephen Compall
  0 siblings, 2 replies; 6+ messages in thread
From: William Xu @ 2006-02-04 10:54 UTC (permalink / raw)


Hi, 

I define the following function, 

(define (enumerate-interval low high)
  "Return a sequence list by walking from LOW to HIGH.
e.g.,
        (enumerate-interval 1 10)
                                 => (1 2 3 4 5 6 7 8 9 10)"
  (if (> low high)
      '()
      (cons low (enumerate-interval (1+ low) high))))

When i passed it a slightly big interval, guile complains "stack
overflow", 

guile > (enumerate-interval 1 400)
...
guile > (enumerate-interval 1 500)
ERROR: Stack overflow
ABORT: (stack-overflow)
guile> 

Might be a bug? (i also tested this on mzscheme, and works fine.)

Guile version: 1.6.7, debian unstable.

-- 
William


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 6+ messages in thread
* stack overflow problem
@ 2006-02-04 17:09 William Xu
  0 siblings, 0 replies; 6+ messages in thread
From: William Xu @ 2006-02-04 17:09 UTC (permalink / raw)


[i wish i'm not resending this mail..]

Hi,

I define the following function,

(define (enumerate-interval low high)
  "Return a sequence list by walking from LOW to HIGH.
e.g.,
        (enumerate-interval 1 10)
                                 => (1 2 3 4 5 6 7 8 9 10)"
  (if (> low high)
      '()
      (cons low (enumerate-interval (1+ low) high))))

When i passed it a slightly big interval, guile complains "stack
overflow",

guile > (enumerate-interval 1 400)
...
guile > (enumerate-interval 1 500)
ERROR: Stack overflow
ABORT: (stack-overflow)
guile>

Might be a bug? (i also tested this on mzscheme, and works fine.)

Guile version: 1.6.7, debian unstable.

-- 
William


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

end of thread, other threads:[~2006-02-13 18:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-04 10:54 stack overflow problem William Xu
2006-02-04 23:03 ` Chusslove Illich
2006-02-05  1:18 ` Stephen Compall
2006-02-05 14:08   ` William Xu
2006-02-13 18:08     ` Holger Blasum
  -- strict thread matches above, loose matches on Subject: below --
2006-02-04 17:09 William Xu

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