Mail Archives: djgpp/2002/02/06/07:17:18
On 6 Feb 2002, Damon Hastings wrote:
> And it would be *nice* if I got a compile-time error instead
> of spontaneous reboots
Unfortunately, this is impossible: there's no way the compiler could tell
what would be the max stack limit of the binary, since (as the FAQ
explains in section 15.9) the run-time stack limit can be changed by
running the stubedit utility on the executable program.
As for reboots, preventing them is a very hard problem, given the
limitations of the DPMI spec. One solution was tried in the past, but it
had so many adverse side effects that it was abandoned.
With the 512KB default limit, this problem only haunts newcomers who
don't read the docs and at the same time define preposterously large
automatic arrays. This combination turns out to be so rare that I
haven't seen such complaints for months, if not years.
- Raw text -