This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]