]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Use correct syscall numbers on arm64. Fix rename, dup2 and getpgrp.
authorMark Wielaard <mark@klomp.org>
Wed, 9 Mar 2016 16:18:34 +0000 (16:18 +0000)
committerMark Wielaard <mark@klomp.org>
Wed, 9 Mar 2016 16:18:34 +0000 (16:18 +0000)
commiteba2cff4801cd7f4be4c1a467c3435e86c9c020b
treed8829731e4e2953c794b78baf8f4b882592205b1
parent912bede3dd21b955eec33fb10e5dafe00eab972c
Use correct syscall numbers on arm64. Fix rename, dup2 and getpgrp.

We were using some wrong syscall numbers in vki-scnums-arm64-linux.h
arm64 doesn't implement a couple of old deprecated system calls like
rename, dup2, getpgrp and fork. Adjust m_libcfile.c rename and dup2
functions to use renameat (also on tilegx) and dup3 (with fcntl fallback
for bad oldfd). And in m_libcproc.c implement getpgrp as getpgid(0).
Also don't compile the fork syswrap on arm64 (it only supports clone).

In practice this only affected callgrind which was unable to rename
dump files in some cases and ELF core dumps might have contained some
bogus prstatus fields.

Related to bug #359503 - Add missing syscalls for aarch64 (arm64)
Reported by Marcin Juszkiewicz who also posted a nice overview
of system calls on different linux architectures:
https://marcin.juszkiewicz.com.pl/2016/03/05/from-a-diary-of-aarch64-porter-system-calls/

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15824
coregrind/m_libcfile.c
coregrind/m_libcproc.c
coregrind/m_syswrap/syswrap-generic.c
include/vki/vki-scnums-arm64-linux.h