NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/58149: aarch64: Cannot return from a signal handler if SP was misaligned when the signal arrived



Hi,

On 14/04/2024 04:40, pho%cielonegro.org@localhost wrote:
[...]

Synopsis:       aarch64: Cannot return from a signal handler if SP was misaligned when the signal arrived

Good catch.

Fix:
Apply this patch:
https://github.com/NetBSD/src/commit/f672806f26384c093c73b4ee0fb94f1fa309ca4a


	sp -= sizeof(ucontext_t);
	sp -= roundup(sizeof(ucontext_t), 16);

I'd prefer a compile time assert for the sizeof of ucontext_t... In fact
it already exists in cpu_machdep.c

https://nxr.netbsd.org/xref/src/sys/arch/aarch64/aarch64/cpu_machdep.c#170



Thanks,
Nick


Home | Main Index | Thread Index | Old Index