Commit
dd28ac0cf4365bd0ea1bcc374cbc5e95a6f39bea
by david.allsoppDynamically allocate the alternate signal stack
In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant.
It is no longer possible to statically allocate the alternate signal
stack for the main thread, as we've been doing for the last 25 years.
This commit implements dynamic allocation of the alternate signal stack
even for the main thread. It reuses the code already in place to allocate
the alternate signal stack for other threads.
The alternate signal stack is freed when the main OCaml code / an OCaml thread
stops.
(partial back-port of PR#10266 and PR#10726)
(commit: dd28ac0)