SA_ONSTACK is required for certain runtimes that use small stacks, for instance the Go runtime.
See https://github.com/golang/go/issues/49075
SA_ONSTACK is a no-op unless someone also calls sigaltstack.
Details
- Reviewers
sebastianpoeplau morehouse
Diff Detail
Event Timeline
Looks good to me in principle. I'm wondering whether there could be situations where a signal stack has been established with sigaltstack but it's intended for some specific signal(s) only - if we were to set SA_ONSTACK uncontitionally, we would run all of the fuzzer's signal handlers on the signal stack. That said, none of the handlers seem to require a lot of stack space, so it's probably fine.
I agree there is a possibility of a problem if signal handlers need more stack than provided by sigaltstack. That seems like a pretty hypothetical problem, however. In contrast, there is a current real problem with executing signals on user's stacks.
Since nobody has objected thus far let's get it in. I don't know if approval from me is enough to be able to merge, but let's try...