[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] SIGPWR



On Wed, Oct 27, 1999 at 11:34:03PM +0200, Thomas Binder wrote:
> 
> But only for programs that can have a detached bs segment, i.e. one
> that can be placed on the boundary of a page, not directly after the
> data segment. And even then you don't know how much of this bss is used
> for the stack and how much for static variables, so it's hard to tell
> when the stack has actually grown too much (or better: When it has grown
> so much that a memory violation is triggered, a lot of local variables
> have already been overwritten, and thus it's unlikely the process hadn't
> crashed before).

We might put the stack outside the BSS - ie. the program calls some kind ot
'StackAlloc', which takes care to align the stack at the right place and
places a protected page in front of it.

On the other hand, the kernel can handle enlarging the stack automatically
in such a setup, so no signal would be needed. In fact, the Linux manpage
says

       SIGSTKFLT    -,16,-      AG     Stack fault on coprocessor

       A      Default action is to terminate the process.
       G      Not a POSIX.1 conformant signal.

so I would guess that SIGSTKFLT is never generated by a user stack overrun,
and we do not need it for compatibility.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen