[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Unbounded stack growth
From: |
Marc Feeley |
Subject: |
Re: [Chicken-users] Unbounded stack growth |
Date: |
Wed, 11 Jul 2012 15:47:45 -0400 |
On 2012-07-11, at 3:44 PM, Jim Ursetto wrote:
> It seems that compiling with clang (llvm 3.0)
> prevents the crash, at least for values up to 20 million, on
> OS X and Linux. Any higher and I start to hit swap.
> I don't know why this works.
>
> Plain gcc on linux, and llvm-gcc (llvm 2.7) on OS X 10.7, do crash
> at about 600k here w/ stack ulimit 8M. Based on your results
> I am guessing your stack ulimit is 4M.
>
> Tried removing __attribute__((noreturn)) from chicken.h, as is done
> for clang and it made no difference, as you'd expect. Only
> other difference from gcc is the stack pointer retrieval code but
> that is identical between clang and llvm-gcc. So I have to
> assume LLVM 3.0 has something to do with the crash avoidance,
> which could very well be luck.
>
> Tested with Chicken 4.7.0.6.
>
> Jim
I'm pretty sure LLVM is simply implementing the tail-call itself. So there is
no stack growth in the unwinding phase. Unfortunately, one can't rely on the C
compiler doing this in general.
Marc
- Re: [Chicken-users] Unbounded stack growth, (continued)
- Re: [Chicken-users] Unbounded stack growth, John Cowan, 2012/07/11
- Re: [Chicken-users] Unbounded stack growth, Alex Shinn, 2012/07/11
- Re: [Chicken-users] Unbounded stack growth, cjtenny, 2012/07/12
- Re: [Chicken-users] Unbounded stack growth, Alex Queiroz, 2012/07/12
- Re: [Chicken-users] Unbounded stack growth, Alex Shinn, 2012/07/12
- Re: [Chicken-users] Unbounded stack growth, Alex Queiroz, 2012/07/12
- Re: [Chicken-users] Unbounded stack growth, Alex Shinn, 2012/07/12
Re: [Chicken-users] Unbounded stack growth, Marc Feeley, 2012/07/11
Re: [Chicken-users] Unbounded stack growth, Shiro Kawai, 2012/07/11
Re: [Chicken-users] Unbounded stack growth, Jim Ursetto, 2012/07/11
- Re: [Chicken-users] Unbounded stack growth,
Marc Feeley <=
Re: [Chicken-users] Unbounded stack growth, Felix, 2012/07/11