aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-varargs.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-21syscall: only compile ptrace varargs shim on LinuxNikhil Benesch1-4/+3
Only compile the __go_ptrace varargs shim on Linux to avoid compilation failures on some other platforms. The C ptrace function is not entirely portable (e.g., NetBSD has `int data` instead of `void* data`), and so far Linux is the only platform that needs the varargs shim. Additionally, make the types in the ptrace and raw_ptrace function declarations match. This makes it more clear that the only difference between the two is that calls via the former are allowed to block while calls via the latter are not. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/263517
2020-10-15runtime: use correct types in __go_ptrace shimNikhil Benesch1-1/+1
Make the types of the addr and data arguments in the __go_ptrace shim match the types declared in Go and the types declared by the C ptrace function, i.e., void*. This avoids a warning about an implicit int-to-pointer cast on some platforms. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262340
2020-09-24runtime: remove __go_ptrace on AIXClément Chigot1-1/+3
AIX ptrace syscalls doesn't have the same semantic than the glibc one. The syscall package is already handling it correctly so disable the new __go_ptrace C function for AIX. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/256777
2020-09-17libgo: fix ptrace syscall hooks into glibcPaul E. Murphy1-0/+16
ptrace is actually declared as a variadic function. On ppc64le the ABI requires to the caller to allocate space for the parameters and allows the caller to modify them. On ppc64le, depending on how and what version of GCC is used, it will save to parameter save area. This happened to clobber a saved LR, and caused syscall.TestExecPtrace to fail with a timeout when the tracee segfaults, and waits for the parent process to inspect. Wrap this function to avoid directly calling glibc's ptrace from go. Fixes golang/go#36698 Fixes go/92567 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/254755
2019-03-19libgo: fix build on AIXIan Lance Taylor1-0/+4
Since aix/ppc64 has been added to GC toolchain, a mix between new and old files were created in gcc toolchain. This commit corrects this merge for aix/ppc64 and aix/ppc. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167658 From-SVN: r269797
2019-02-15runtime: include <syscall.h> and <sys/syscall.h> if availableIan Lance Taylor1-0/+6
Fixes Solaris build. Reviewed-on: https://go-review.googlesource.com/c/162885 From-SVN: r268940
2019-02-15compiler, runtime: harmonize types referenced by both C and GoIan Lance Taylor1-0/+11
Compiling with LTO revealed a number of cases in the runtime and standard library where C and Go disagreed about the type of an object or function (or where Go and code generated by the compiler disagreed). In all cases the underlying representation was the same (e.g., uintptr vs. void*), so this wasn't causing actual problems, but it did result in a number of annoying warnings when compiling with LTO. Reviewed-on: https://go-review.googlesource.com/c/160700 From-SVN: r268923
2015-11-06libgo: Solaris portability fixes.Ian Lance Taylor1-0/+1
Only build net/hook_cloexec.go on GNU/Linux and FreeBSD, because those are the only systems with accept4. Add syscall/libcall_bsd.go to define sendfile for *BSD and Solaris. Revert tcpsockopt_solaris.go back to the earlier version, so that it works on Solaris 10. Always pass the address of a Pid_t value to TIOCGPGRP and TIOCSPGRP. Include <unistd.h> in runtime/go-varargs.c. Reviewed-on: https://go-review.googlesource.com/16719 From-SVN: r229880
2015-10-31runtime: Remove now unnecessary pad field from ParFor.Ian Lance Taylor1-0/+13
It is not needed due to the removal of the ctx field. Reviewed-on: https://go-review.googlesource.com/16525 From-SVN: r229616
2015-10-07re PR go/67874 (fd_unix.go does not build when there is fcntl64 and no fcntl ↵Ian Lance Taylor1-0/+24
syscall) PR go/67874 net, runtime: Call C library fcntl function rather than syscall.Syscall. Not all systems define a fcntl syscall; some only have fcntl64. Fixes GCC PR go/67874. Reviewed-on: https://go-review.googlesource.com/15497 From-SVN: r228576
2014-06-06libgo: Merge to master revision 19184.Ian Lance Taylor1-0/+6
The next revision, 19185, renames several runtime files, and will be handled in a separate change. From-SVN: r211328
2013-11-24syscall: Only call varargs libc functions from C code.Ian Lance Taylor1-0/+47
From-SVN: r205321