Re: [patch/rfc/testsuite] Test GDB on not-so-little core files

Daniel Jacobowitz
2004-01-15T19:13:41Z

On Thu, Jan 15, 2004 at 02:09:34PM -0500, Andrew Cagney wrote:
> >Hmm, can you think of an efficient way of soaking up most of the stack
> >>...? :-) On GNU/Linux, alloca() proved to be useless :-(
> >
> >
> >The best you're likely to get is recursively calling a function with a,
> >say, 4K frame.
>
> That would unfortunatly defeat the current technique of creating a very
> large but very sparse core file. I'll see what I can cook up.

If you don't touch the stack at least once in a while, you will get
segfaults without first allocating stack space, on many platforms;
they'll look at how far down the stack you went and if you've moved
past the limit into data, they won't bother to grow the stack. I'm not
sure it's possible to get stack pages allocated that aren't backed by
allocated memory...

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer