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: Michael Snyder <msnyder at redhat dot com>
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 31 Dec 2001 11:58:39 -0800
- Subject: Re: [RFA] Crasher bug in infptrace.c
- References: <Pine.SUN.3.91.1011231082113.14926C-100000@is>
Eli Zaretskii wrote:
>
> On Sun, 30 Dec 2001, Michael Snyder wrote:
>
> > + /* Set an upper limit on alloca. */
> > + #ifndef GDB_MAX_ALLOCA
> > + #define GDB_MAX_ALLOCA 0x100000
> > + #endif
>
> Isn't it better to use `getrlimit' to find out the max stack size, than
> to set up arbitrary limits (and proliferate system-specific definitions
> of GDB_MAX_ALLOCA)? At least on systems where `getrlimit' is available,
> I think we should use it.
Good idea, but it will require additional work (such as
using configure to determine whether getrlimit is supported).
May I suggest that this patch be accepted until someone
volunteers to do a better one?
> (FWIW, 1MB is too large for DJGPP, whose runtime stack defaults to
> 512KB. `getrlimit' is supported, so it will tell.)
Does djgpp use infptrace?