Mail Archives: djgpp/2001/06/26/16:45:07.1
Hello.
Graaagh the Mighty wrote:
> > That would require to use a separate selector for the stack (because
> > the stack is expand-down, and so needs a special segment setup for
> > detecting stack overflows). This is possible, but has a serious
> > problem: you cannot use -fomit-stack-pointer, because the EBP register
> > will trigger a GPF if loaded with a value larger than the stack size.
>
> That suggests to make such a scheme be used when code is compiled with
> -g and not -fomit-frame-pointer. If stack smashage is suspected, the
> programmer can just use -g and disable -fomit-frame-pointer.
[snip]
> When it's debugged, they can turn the optimization back on for making
> the production code.
So you want different behaviour when compiled with -g and without? That
could make debugging an interesting experience. I think this kind of
behaviour would be a hinderance more than a help.
Have you tried putting a limit on the recursion in your program, to see
whether that stops the stack overflow? Maybe that would at least help you
debug?
Bye,
--
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/
- Raw text -