https://bugs.kde.org/show_bug.cgi?id=486538
--- Comment #5 from Paul Floyd <[email protected]> --- I can't see a problem in your logs. But looking at the code things do look wrong. For example, when loading /usr/home/paulf/scratch/valgrind/memcheck/vgpreload_memcheck-amd64-freebsd.so The PT_LOADs are LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12 filesz 0x0000000000005fc4 memsz 0x0000000000005fc4 flags r-- LOAD off 0x0000000000005fd0 vaddr 0x0000000000006fd0 paddr 0x0000000000006fd0 align 2**12 filesz 0x000000000000cfd0 memsz 0x000000000000cfd0 flags r-x LOAD off 0x0000000000012fa0 vaddr 0x0000000000014fa0 paddr 0x0000000000014fa0 align 2**12 filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw- LOAD off 0x0000000000013130 vaddr 0x0000000000016130 paddr 0x0000000000016130 align 2**12 filesz 0x0000000000000058 memsz 0x00000000000000e8 flags rw- And some debug traces with // comments (these values come from the client mmap) DEBUG: vgPlain_di_notify_mmap start 0x4846000 end 0x484BFFF size 6000 offset 0 // RO DEBUG: vgPlain_di_notify_mmap start 0x484C000 end 0x4859FFF size e000 offset 5000 // RX DEBUG: vgPlain_di_notify_mmap start 0x485A000 end 0x485BFFF size 2000 offset 12000 // RW1 DEBUG: vgPlain_di_notify_mmap start 0x485C000 end 0x485CFFF size 1000 offset 13000 // RW2 My reading of that is that the mmap offset is the ELF offset page rounded down. The mmap size is harder to follow. The first RO one is page rounded up. The second RX and third RW1 look like they are page rounded up plus one page (because of the overlap?). The last RW2 looks just page rounded up. ML_(read_elf_object) uses Bool offset_checks = a_phdr.p_offset >= map->foff && a_phdr.p_offset < map->foff + map->size && a_phdr.p_offset + a_phdr.p_filesz <= map->foff + map->size; That's mixing mmap and ELF values. RW1 gets added twice because 0x13130 is within both offset 0x12000 size 0x2000 and offset 0x13000 size 0x1000. -- You are receiving this mail because: You are watching all bug changes.
