There is (was?) some stack checking done at the system call level.
However, it's not 100% foolproof - if the program gets sp above the
low-water mark after dipping into bss before the next system call it won't
be detected.
Now, if you had a magic # right after bss and checked that also,
that would really improve the stack checking.
- Chad
On Thu, 24 Jun 1999, Greg Haerr wrote:
>
> : Is there any checking on the Stack Size (to prevent it over writing
> : the stack)?
> :
>
> Not by bcc. Let me know if you'd like me to add stack overflow checking.
>
>
>
> : Psion (on SIBO) seem to place a fixed stack at the bottom of the data
> : segment (which grows down towards DS:0000), then initialised data, then
> : un-initilised and then heap (which grows up). This has the advantage that
> : the 'hardware protection' can detect if the application writes outside it's
> : allocated data segment and halt the application. But the disadvantage that
> : the maximum stack size MUST be allocated at compile time.
> :
>
> Why do we need to reorient the stack placement in the DS segment
> in order to use the hardware protection feature? I don't seem to be getting this.
>
>
> Greg
>