From: Ivo R. <iv...@iv...> - 2017-11-29 17:19:34
|
2017-11-29 17:55 GMT+01:00 Silva João <joa...@al...>: > This is the result of readelf -l: ... > Program Headers: > Type Offset VirtAddr PhysAddr > FileSiz MemSiz Flags Align > PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040 > 0x00000000000001f8 0x00000000000001f8 R E 8 > INTERP 0x0000000000000238 0x0000000000400238 0x0000000000400238 > 0x000000000000001c 0x000000000000001c R 1 > [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2] > LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 > 0x000000000045e870 0x000000000045e870 R E 200000 > LOAD 0x000000000045e870 0x0000000000a5e870 0x0000000000a5e870 > 0x0000000000004c98 0x000000006ae482b0 RW 200000 This program header shows: FileSize: 0x4c98 MemSize: 0x000000006ae482b0 (~1,7 GB) So Valgrind is interpreting this file correctly. I have no idea why this file wants to allocate ~1,7 GB of bss. If that is even remotely correct than Valgrind built as-is cannot map this ELF file at an absolute address. You can work around this problem by redefining Valgrind's load address to a higher one. It's currently 0x58000000 (check with the SEGMENT OUTPUT from previous conversation). Right before it there is a free address space of ~1344m. You need to enlarge this to be big enough to accommodate for your large BSS segment. Have a look at configure.ac (run ./autogen.sh && ./configure). if that works for you, you can submit a patch to have Valgrind's load address configurable with configure, for example. And also supply a better error message and diagnostics about this problem next time. I. |