Eric Blake wrote: > On Solaris 8, uc_stack is (IMHO properly) pointing to the primary stack, > even though the handler is executing on the alternate stack.
That's accidental, IMO. The only documented use of uc_stack in POSIX:2001 is in the description of 'makecontext', as an input parameter. Its meaning is not documented in the use of 'getcontext' or when a signal handler is invoked. Therefore, if the next version of POSIX does not have 'makecontext', IMO they should also remove the uc_stack member. Also, you know that the main context has a growing stack; it's managed by the kernel as something dynamic (taking into account the RLIMITs that will be in effect), not as something static. Such a dynamic piece of stack cannot be adequately represented by a stack_t. Solaris escapes the problem by returning to you a snapshot of the stack VMA bounds; Linux escapes the problem by returning the alternate stack bounds (which _is_ a stack_t). > Again, anyone know how to report something like that? First, gather enough arguments that it is really a bug in Linux (which I dispute). Then, write a kernel patch that fixes the bug, relative to the newest development kernels. Third, submit it to LKML, and be prepared to either a heated discussion or complete silence :-) Bruno