This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: stack overflow


Alexander Asteroth <alexander.asteroth@informatik.uni-bonn.de> writes:

> Hi,
> 
> I just wanted to report some strange behavior I noticed in guile-1.3
> 
> The program I run uses more stack than enabled by default. Therefore I
> included  the line
> 
> scm_stack_checking_enabled_p = SCM_STACK_CHECKING_P;
> 
> into debug.c, as reported by mcj, and (debug-set! stack  0)

Is this set in your .guile file or in the program file? If it's in
.guile, the problem is that guile -s doesn't use .guile

For example, in my .guile file, I have
(use-modules (guile syncase))

[greg ~/src/scratch]$ cat testls.scm
(define-syntax sven
  (syntax-rules ()
    ((_ x) (bork (bork (bork x))))))

[greg ~/src/scratch]$ guile -l testls.scm
guile> (quit)

[greg ~/src/scratch]$ guile -s testls.scm
testls.scm:1:1: In expression (define-syntax sven (syntax-rules () #)):
testls.scm:1:1: Unbound variable: define-syntax

You can get around that by doing
guile -l ~/.guile -s script
 
> If I run the program interactively everything works fine.
> If I run it using the -l switch everything is fine too, but if I use
> the -s switch the stack seems to be unchanged and I get a stack-overflow.
> 

-- 
Greg