Skip to content

tests: Move alternate stack onto the heap rather than the main stack

Philip Withnall requested to merge wip/pwithnall/3315-sigaltstack-again into main

And size it to sysconf (_SC_MINSIGSTKSZ), if defined.

This might fix the sigaltstack test on muslc, as suggested by Markus Wichmann (https://www.openwall.com/lists/musl/2024/05/30/2) and Rich Felker (https://www.openwall.com/lists/musl/2024/05/29/7) on the musl mailing list.

The thinking is that the CI machine might have a huge register file (AVX512 or some other large extension) which doesn’t fit in MINSIGSTKSZ. By sizing the alternate stack to sysconf (_SC_MINSIGSTKSZ) we should be able to avoid that.

Moving it onto the heap should avoid any potential complications or bugs from having one stack embedded within another.

Signed-off-by: Philip Withnall pwithnall@gnome.org

Fixes: #3315 (closed)

Merge request reports