This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Crasher bug in infptrace.c
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 1 Jan 2002 08:04:48 +0200 (IST)
- Subject: Re: [RFA] Crasher bug in infptrace.c
On Mon, 31 Dec 2001, Michael Snyder wrote:
> > > (FWIW, 1MB is too large for DJGPP, whose runtime stack defaults to
> > > 512KB. `getrlimit' is supported, so it will tell.)
> >
> > Does djgpp use infptrace?
>
> And I meant to add -- if so, you can always define GDB_MAX_ALLOCA
> to a smaller value.
Having yet another system-dependent macro is something I wanted to avoid.
Also, a static compile-time limit would have trouble in the face of users
and sysadmins who can change the stack limits with `ulimit' and similar
facilities. Even with DJGPP, you can modify the maximum stack size of a
program to an arbitrarily large or small value with a special utility.
Perhaps setting the limit you suggested to a much smaller value, like
10KB, say, would be a better and easier way of solving this. IIRC, last
time the alloca issue was discussed, the consensus about the maximum size
of safe off-stack allocations was that it should be a few KB.