Philippe Waroquiers f05d0d0969 patch fixing 297991: mmap changing a file descriptor current position
Bug caused by the following problem:
for each mmap, Valgrind reads the 1st 1024 bytes to detect
if this is an mmap-ed file containing debug info to decode.

Reading this 1Kb is done with VG_(pread). VG_(pread) should be
the equivalent of syscall pread but on linux, it is implemented as
a seek+read. 

The patch implements VG_(pread) in terms of the underlying pread syscall.

Test mmap_fcntl_bug.c completed to also verify the fd current position
before and after the mmap. 

tested on linux x86/amd64/ppc32/ppc64/s390.
(not tested on Darwin)
(manually tested on arm-android)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12504
2012-04-13 23:07:29 +00:00
..
2004-01-03 14:24:42 +00:00
2004-02-15 16:12:35 +00:00
2004-02-15 16:12:35 +00:00
2004-02-15 16:12:35 +00:00
2009-08-04 02:32:55 +00:00
2009-08-04 02:32:55 +00:00
2009-08-12 00:14:44 +00:00
2004-01-06 21:46:02 +00:00
2004-01-06 21:46:02 +00:00
2004-01-06 21:46:02 +00:00
2012-03-02 09:57:14 +00:00
2006-10-17 01:28:48 +00:00
2004-01-03 14:24:42 +00:00
2005-08-15 13:29:43 +00:00
2006-12-12 01:38:15 +00:00
2004-01-03 14:24:42 +00:00
2005-03-15 01:41:08 +00:00
2006-10-17 01:28:48 +00:00
2006-10-17 01:28:48 +00:00