From 705bcf4d731053976cb77aa30bd07e2a27ddbae6 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 15 Jul 2009 05:46:43 +0000 Subject: [PATCH] Handle setpgid(). Partly addresses bug 198624. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10457 --- coregrind/m_syswrap/syswrap-darwin.c | 2 +- memcheck/tests/darwin/scalar.c | 8 +++++--- memcheck/tests/darwin/scalar.stderr.exp | 17 +++++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index ae69cd24e8..bf0c4595a3 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -7124,7 +7124,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { GENXY(__NR_getgroups, sys_getgroups), // _____(__NR_setgroups), // 80 GENX_(__NR_getpgrp, sys_getpgrp), -// _____(__NR_setpgid), + GENX_(__NR_setpgid, sys_setpgid), GENXY(__NR_setitimer, sys_setitimer), _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(84)), // old wait // _____(__NR_swapon), diff --git a/memcheck/tests/darwin/scalar.c b/memcheck/tests/darwin/scalar.c index 6015bbfd21..24ac0e532c 100644 --- a/memcheck/tests/darwin/scalar.c +++ b/memcheck/tests/darwin/scalar.c @@ -160,14 +160,16 @@ int main(void) GO_UNIMP(77, "old vlimit"); - // __NR_mincore 218 - GO(__NR_mincore, 218, "3s 1m"); + GO(__NR_mincore, 78, "3s 1m"); SY(__NR_mincore, x0, x0+40960, x0); FAIL; // __NR_getgroups 79 // __NR_setgroups 80 // __NR_getpgrp 81 - // __NR_setpgid 82 + + GO(__NR_setpgid, 82, "2s 0m"); + SY(__NR_setpgid, x0-1, x0-1); FAIL; + // __NR_setitimer 83 GO_UNIMP(78, "old wait"); diff --git a/memcheck/tests/darwin/scalar.stderr.exp b/memcheck/tests/darwin/scalar.stderr.exp index 904777f7e0..01c6ec4310 100644 --- a/memcheck/tests/darwin/scalar.stderr.exp +++ b/memcheck/tests/darwin/scalar.stderr.exp @@ -235,7 +235,7 @@ Syscall param chown(path) points to unaddressable byte(s) (77): old vlimit ----------------------------------------------------- ----------------------------------------------------- -x200004e(218): __NR_mincore 3s 1m +x200004e(78): __NR_mincore 3s 1m ----------------------------------------------------- Syscall param mincore(start) contains uninitialised byte(s) @@ -251,6 +251,15 @@ Syscall param mincore(vec) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- +x2000052(82): __NR_setpgid 2s 0m +----------------------------------------------------- + +Syscall param setpgid(pid) contains uninitialised byte(s) + ... + +Syscall param setpgid(pgid) contains uninitialised byte(s) + ... +----------------------------------------------------- (78): old wait ----------------------------------------------------- ----------------------------------------------------- @@ -623,6 +632,9 @@ Syscall param stat_extended(fsacl) contains uninitialised byte(s) Syscall param stat_extended(fsacl_size) contains uninitialised byte(s) ... +More than 100 errors detected. Subsequent errors +will still be recorded, but in less detail than before. + Syscall param stat_extended(file_name) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd @@ -631,9 +643,6 @@ Syscall param stat_extended(buf) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -More than 100 errors detected. Subsequent errors -will still be recorded, but in less detail than before. - Syscall param stat_extended(fsacl_size) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -- 2.47.3