Re:Raw Linux Threads via System Calls
by 0x0 on Sunday June 07, 2015 @03:03PM
(#9675942)
Is there no risk of an interrupt or a signal happening in between un-mmap'ing and calling exit, that would cause stack pushes?
[ Parent
| on HN ]
That is a risk, which is why you need to block all signals using the sigprocmask syscall before unmapping your stack.
Or you just don't have signal-handling functions. Signals only touch the stack if you handle them via functions. The default signal dispositions all either kill the process or do nothing, so they don't touch the stack.