libco icon indicating copy to clipboard operation
libco copied to clipboard

stack 16-byte alignment fix for arm/x86 versions

Open TestudoAquatilis opened this issue 3 years ago • 2 comments

should fix #32 form arm/x86 variants, but unfortunately only actually tested on amd64 platform (others only compilable and by plausibility)

TestudoAquatilis avatar Feb 02 '22 20:02 TestudoAquatilis

@Alcaro any thoughts on this?

carmiker avatar Feb 18 '22 23:02 carmiker

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).

Alcaro avatar Feb 19 '22 08:02 Alcaro

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!

Screwtapello avatar May 16 '23 14:05 Screwtapello