> On Jun 23, 2016, at 9:11 AM, Andy Wingo <wi...@pobox.com> wrote:
> 
> On Thu 23 Jun 2016 14:59, Daniel Llorens <daniel.llor...@bluewin.ch> writes:
> 
>>>> We are pleased to announce GNU Guile release 2.1.3.
>>> 
>>> Tried on my Mac OS 10.10.5 against Macports 2.3.4 w/ gcc-mp-5.  
>>> make check generated FAIL for test-language and test-stack-overflow and 
>>> stopped working after test-stack-overflow.
>> 
>> I can confirm the failure of test-stack-overflow on 10.9.5 too. 
> 
> I am not sure how to debug this one as I don't have a Mac.  If you are
> able to figure this one out, Daniel, that would be a great help.

I was able to get gdb-uninstalled-guile to run (by symlinking 
libguile-2.2.dynlib in $prefix/lib).  I accidentally killed the process.  But 
before I restart I want to understand the intended behavior.  The relevant code 
from test-stack-overflow is this:

;; 100 MB.
(define *limit* (* 100 1024 1024))

(call-with-values (lambda () (getrlimit 'as))
  (lambda (soft hard)
    (unless (and soft (< soft *limit*))
      (setrlimit 'as (if hard (min *limit* hard) *limit*) hard))))

(define (test)
  (catch 'stack-overflow
    (lambda ()
      (let lp ()
        (lp)
        (error "should not be reached")))
    (lambda _
      #t)))

On my mac (getrlimit ‘as) => #f #f.   So it looks like the args to setrlimit 
are 100 MB and #f.  Is the program supposed to die gracefully at 100 MB?   When 
I (accidentally) stopped the program (under gdb) the process was using 56 GB of 
memory.

Matt

Reply via email to