From 406c75d202283ba5f6fb8949f43bd3162ff49642 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Sat, 21 Apr 2012 15:33:26 +0000 Subject: [PATCH] Fix assertion failure on x86-darwin following r12504 (pread fix) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12523 --- coregrind/m_libcfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index 281dfbec50..4bc07cbe38 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -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" -- 2.47.2