]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Support and test mincore() on Darwin.
authorNicholas Nethercote <njn@valgrind.org>
Wed, 24 Jun 2009 04:15:29 +0000 (04:15 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Wed, 24 Jun 2009 04:15:29 +0000 (04:15 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10368

coregrind/m_syswrap/syswrap-darwin.c
memcheck/tests/darwin/scalar.c
memcheck/tests/darwin/scalar.stderr.exp

index 4deb3a7a3c48db5ec8f5490c9614e1c8eb288f0e..3bdc01a676003e594e0b75733ce3e171d4ab0a88 100644 (file)
@@ -7064,7 +7064,7 @@ const SyscallTableEntry ML_(syscall_table)[] = {
    GENX_(__NR_madvise,     sys_madvise), 
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(76)),    // old vhangup
    _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(77)),    // old vlimit
-// _____(__NR_mincore), 
+   GENXY(__NR_mincore,     sys_mincore), 
    GENXY(__NR_getgroups,   sys_getgroups), 
 // _____(__NR_setgroups),   // 80
    GENX_(__NR_getpgrp,     sys_getpgrp), 
index d5dc5a0a0fa8f9f8cd59fa702e4e77da129cc61a..6c43caf9843df170e238739ede0227804b667f94 100644 (file)
@@ -160,7 +160,10 @@ int main(void)
 
    GO_UNIMP(77, "old vlimit");
 
-   // __NR_mincore 78
+   // __NR_mincore 218
+   GO(__NR_mincore, 218, "3s 1m");
+   SY(__NR_mincore, x0, x0+40960, x0); FAIL;
+
    // __NR_getgroups 79
    // __NR_setgroups 80
    // __NR_getpgrp 81
index c88f29a23c61485507e885e5131f28bb82bead7a..89f0580b8207564e5d3dca7da7145dedce07d2fe 100644 (file)
@@ -235,6 +235,22 @@ Syscall param chown(path) points to unaddressable byte(s)
 (77):            old vlimit
 -----------------------------------------------------
 -----------------------------------------------------
+x200004e(218):        __NR_mincore 3s 1m
+-----------------------------------------------------
+
+Syscall param mincore(start) contains uninitialised byte(s)
+   ...
+
+Syscall param mincore(length) contains uninitialised byte(s)
+   ...
+
+Syscall param mincore(vec) contains uninitialised byte(s)
+   ...
+
+Syscall param mincore(vec) points to unaddressable byte(s)
+   ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+-----------------------------------------------------
 (78):            old wait
 -----------------------------------------------------
 -----------------------------------------------------
@@ -615,6 +631,9 @@ 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
@@ -632,9 +651,6 @@ Syscall param lstat_extended(file_name) contains uninitialised byte(s)
 Syscall param lstat_extended(buf) contains uninitialised byte(s)
    ...
 
-More than 100 errors detected.  Subsequent errors
-will still be recorded, but in less detail than before.
-
 Syscall param lstat_extended(fsacl) contains uninitialised byte(s)
    ...