]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix assertion failure on x86-darwin following r12504 (pread fix)
authorJulian Seward <jseward@acm.org>
Sat, 21 Apr 2012 15:33:26 +0000 (15:33 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 21 Apr 2012 15:33:26 +0000 (15:33 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12523

coregrind/m_libcfile.c

index 281dfbec5053da84495bd4212414673579abaa24..4bc07cbe38ee6d58f4c95e47ecef3ad413eae8e8 100644 (file)
@@ -601,12 +601,13 @@ SysRes VG_(pread) ( Int fd, void* buf, Int count, OffT offset )
    res = VG_(do_syscall4)(__NR_pread64, fd, (UWord)buf, count, offset);
    return res;
 #  elif defined(VGP_amd64_darwin)
+   vg_assert(sizeof(OffT) == 8);
    res = VG_(do_syscall4)(__NR_pread_nocancel, fd, (UWord)buf, count, offset);
    return res;
 #  elif defined(VGP_x86_darwin)
-   vg_assert(sizeof(OffT) == 4);
+   vg_assert(sizeof(OffT) == 8);
    res = VG_(do_syscall5)(__NR_pread_nocancel, fd, (UWord)buf, count, 
-                          offset, 0);
+                          offset & 0xffffffff, offset >> 32);
    return res;
 #  else
 #    error "Unknown platform"