libco
libco copied to clipboard
stack 16-byte alignment fix for arm/x86 versions
should fix #32 form arm/x86 variants, but unfortunately only actually tested on amd64 platform (others only compilable and by plausibility)
@Alcaro any thoughts on this?
Didn't test, but looks reasonable. (Unless it guarantees the stack is misaligned, I didn't check.)
Stack alignment is required by several ABIs; without it, you may get SIGBUS when spilling an SSE variable to stack, or other trouble (for example, wouldn't surprise me if OpenBSD syscalls kill your process if stack is misaligned).
Now that we have some basic automated tests for the platforms in question, I rebased this PR onto the current state of master
and verified that the tests pass. Thanks for your efforts, @TestudoAquatilis!