mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-07 04:38:00 +00:00
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