On 24 Jun 2016, at 18:18, Matt Wette <matt.we...@gmail.com> wrote:

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

Yes, the OS is supposed to send a signal when the limit is reached and Guile 
handles it and throws an exception. So the test just catches that a few times 
and then ends.

We looked at this over IRC and it seems OS X simply ignores these limits. There 
are complaints about it all over the web.  If you hadn't stopped the process it 
would have started to eat swap space and eventually take down your machine. 

For the time being these tests are disabled in master 
(http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=9687334ff52a2def369e7abb8563401351db9be7).

Thanks for bringing this up.  I use Guile on OS X but I hadn't run make check 
for a while.





Reply via email to