From: Guoqi Chen Date: Fri, 7 Jun 2024 01:36:53 +0000 (+0800) Subject: runtime: add padding to Linux kernel structures sigcontext on loong64 X-Git-Tag: go1.24rc1~1263 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=36e5c84ffa8b64727b01f056b550c235636c123a;p=gostls13.git runtime: add padding to Linux kernel structures sigcontext on loong64 On linux/loong64, the sc_extcontext member in the sigcontext structure is required to be 16-byte aligned [1], although sc_extcontext is not currently used anywhere, it still needs to be padded to the specified alignment. [1] https://github.com/torvalds/linux/blob/master/arch/loongarch/include/uapi/asm/sigcontext.h Change-Id: I98d30e921730314835c9469a6f28e186c9808e34 Reviewed-on: https://go-review.googlesource.com/c/go/+/591855 Reviewed-by: Qiqi Huang Reviewed-by: sophie zhao LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: David Chase --- diff --git a/src/runtime/defs_linux_loong64.go b/src/runtime/defs_linux_loong64.go index 692d8c78e9..b983725160 100644 --- a/src/runtime/defs_linux_loong64.go +++ b/src/runtime/defs_linux_loong64.go @@ -184,6 +184,7 @@ type sigcontext struct { sc_pc uint64 sc_regs [32]uint64 sc_flags uint32 + sc_pad0 [1]uint32 sc_extcontext [0]uint64 }