[gnu.gdb.bug] Remarks on BROKEN_LARGE_ALLOCA

chase@orc.olivetti.com (11/15/89)

Comments in "m-sun3os4.h" say:

  /* There is a bug which can cause alloca to fail to allocate large
     areas of memory one time in every 4096 (we think).  Hard to
     reproduce so it will be hard to detect when this bug is fixed.  */
  #define BROKEN_LARGE_ALLOCA

It is certainly the case that ALLOCA is "broken" when a request larger
than the stack limit is made.  This is not a problem with the current
version of gdb (3.4), but it was 100% reproducible under an older
version (3.2).  The workaround here is easy enough if the user knows
what the problem is, but the only diagnostic provided is "Segmentation
fault" (instead of, say, "please increase your stack limit and run gdb
again", or (better) automatically choosing xmalloc for alloca requests
that cannot be satisfied).

Anyhow, I think the comment does not describe what is really going on,
and indicates an intention to "break" gdb (for my purposes) in the
future.

David