From cfaaa6a1ca744c1a93fa08a3e7ab2a821383cac1 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Fri, 8 Jan 2021 15:43:54 -0600 Subject: [PATCH] syscall: ensure openat uses variadic libc wrapper On powerpc64le, this caused a failure in TestUnshareUidGidMapping due to stack corruption which resulted in a bogus execve syscall. Use the existing c wrapper to ensure we respect the ppc abi for variadic functions. Fixes PR go/98610 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/282717 --- gcc/go/gofrontend/MERGE | 2 +- libgo/go/syscall/exec_linux.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 094b8fad483..cd95c3d0755 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a2578eb3983514641f0baf44d27d6474d3a96758 +255657dc8d61ab26121ca68f124412ef37599166 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/syscall/exec_linux.go b/libgo/go/syscall/exec_linux.go index 38975810432..0da6c964966 100644 --- a/libgo/go/syscall/exec_linux.go +++ b/libgo/go/syscall/exec_linux.go @@ -20,7 +20,7 @@ import ( //mount(source *byte, target *byte, fstype *byte, flags _C_long, data *byte) _C_int //sysnb rawOpenat(dirfd int, pathname *byte, flags int, perm uint32) (fd int, err Errno) -//openat(dirfd _C_int, pathname *byte, flags _C_int, perm Mode_t) _C_int +//__go_openat(dirfd _C_int, pathname *byte, flags _C_int, perm Mode_t) _C_int // SysProcIDMap holds Container ID to Host ID mappings used for User Namespaces in Linux. // See user_namespaces(7). -- 2.30.2