Re: PROBLEM: large auto variables cause segfault under 2.6

From: Andrei A. Voropaev
Date: Tue Oct 05 2004 - 08:48:13 EST


On Tue, Oct 05, 2004 at 03:40:52PM +0200, Arjan van de Ven wrote:
> On Tue, 2004-10-05 at 15:27, Andrei A. Voropaev wrote:
> > Declaring very large auto variables cause segfaults in the program under
> > 2.6 kernel.
> >
> > Take a look at this program.
> >
> > int main( int argc, char **argv )
> > {
> > unsigned char bRet = 0;
> >
> > char tst[67123456];
> >
> you have a stack variable that is several orders of magnitude bigger
> than the rlimit you have set for the stack I suspect. Try increasing the
> stack rlimit...
>

Yep. I was just going to write "excuse me" letter. Looks like under new
kernel the kernel stack is limited to 8M while under 2.4 kernel it is
unlimited. So setrusage should help us.

Sorry for distractions.

Andrei


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/