2017-11-29 19:04 GMT+01:00 Silva João <joao.si...@altran.com>:
>> I have no idea why this file wants to allocate ~1,7 GB of bss.
>
> All memory is allocated statically in Ada/SPARK. There is no dynamic memory 
> allocation except for the usage of libxerces in C/C++.

BSS is statically "allocated" memory.

>
>> 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).
>
> I didn't find a SEGMENT OUTPUT occurrence in our conversation.

Oh, have a look here where segment 3. has been created and listed in
the second SHOW_SEGMENTS output.

--92903:0:     ume mmap_file_fixed_client #1
--92903:0: aspacem <<< SHOW_SEGMENTS: after #1 (19 segments)
--92903:0: aspacem 2 segment names in 2 slots
--92903:0: aspacem freelist is empty
--92903:0: aspacem (0,4,3)
/home/AltranUK/jsilva.fs/lib/valgrind/memcheck-amd64-linux
--92903:0: aspacem (1,67,1) /u/wh/rel/ifaplrel/pw_fwp_engine.eab
--92903:0: aspacem   0: RSVN 0000000000-00003fffff 4194304 ----- SmFixed
--92903:0: aspacem   1: file 0000400000-000085efff 4583424 r-x--
d=0xfd00 i=712737  o=0       (1,67)
--92903:0: aspacem   2: RSVN 000085f000-0003ffffff     55m ----- SmFixed
--92903:0: aspacem   3:      0004000000-0057ffffff   1344m
--92903:0: aspacem   4: FILE 0058000000-0058235fff 2318336 r-x--
d=0xfd02 i=2635334 o=0       (0,4)
--92903:0: aspacem   5:      0058236000-0058434fff 2093056
--92903:0: aspacem   6: FILE 0058435000-0058437fff   12288 rw---
d=0xfd02 i=2635334 o=2314240 (0,4)
--92903:0: aspacem   7: ANON 0058438000-0059e39fff     26m rw---
--92903:0: aspacem   8:      0059e3a000-1001ffffff  64129m
--92903:0: aspacem   9: RSVN 1002000000-1002000fff    4096 ----- SmFixed
--92903:0: aspacem  10: ANON 1002001000-1002400fff 4194304 rwx--
--92903:0: aspacem  11:      1002401000-1fffffffff  65499m
--92903:0: aspacem  12: RSVN 2000000000-7ffc6d8e8fff 130929g ----- SmFixed
--92903:0: aspacem  13: ANON 7ffc6d8e9000-7ffc6d90afff  139264 rw---
--92903:0: aspacem  14: RSVN 7ffc6d90b000-7ffc6d972fff  425984 ----- SmFixed
--92903:0: aspacem  15: ANON 7ffc6d973000-7ffc6d974fff    8192 r-x--
--92903:0: aspacem  16: RSVN 7ffc6d975000-ffffffffff5fffff  16383e ----- SmFixed
--92903:0: aspacem  17: ANON ffffffffff600000-ffffffffff600fff    4096 r-x--
--92903:0: aspacem  18: RSVN ffffffffff601000-ffffffffffffffff      9m
----- SmFixed
--92903:0: aspacem >>>
--92903:0:     ume mmap_file_fixed_client #1
--92903:0: aspacem <<< SHOW_SEGMENTS: after #1 (21 segments)
--92903:0: aspacem 2 segment names in 2 slots
--92903:0: aspacem freelist is empty
--92903:0: aspacem (0,4,3)
/home/AltranUK/jsilva.fs/lib/valgrind/memcheck-amd64-linux
--92903:0: aspacem (1,67,3) /u/wh/rel/ifaplrel/pw_fwp_engine.eab
--92903:0: aspacem   0: RSVN 0000000000-00003fffff 4194304 ----- SmFixed
--92903:0: aspacem   1: file 0000400000-000085efff 4583424 r-x--
d=0xfd00 i=712737  o=0       (1,67)
--92903:0: aspacem   2: RSVN 000085f000-0000a5dfff 2093056 ----- SmFixed
--92903:0: aspacem   3: file 0000a5e000-0000a63fff   24576 rw---
d=0xfd00 i=712737  o=4579328 (1,67)
--92903:0: aspacem   4: RSVN 0000a64000-0003ffffff     53m ----- SmFixed
--92903:0: aspacem   5:      0004000000-0057ffffff   1344m
--92903:0: aspacem   6: FILE 0058000000-0058235fff 2318336 r-x--
d=0xfd02 i=2635334 o=0       (0,4)
--92903:0: aspacem   7:      0058236000-0058434fff 2093056
--92903:0: aspacem   8: FILE 0058435000-0058437fff   12288 rw---
d=0xfd02 i=2635334 o=2314240 (0,4)
--92903:0: aspacem   9: ANON 0058438000-0059e39fff     26m rw---
--92903:0: aspacem  10:      0059e3a000-1001ffffff  64129m
--92903:0: aspacem  11: RSVN 1002000000-1002000fff    4096 ----- SmFixed
--92903:0: aspacem  12: ANON 1002001000-1002400fff 4194304 rwx--
--92903:0: aspacem  13:      1002401000-1fffffffff  65499m
--92903:0: aspacem  14: RSVN 2000000000-7ffc6d8e8fff 130929g ----- SmFixed
--92903:0: aspacem  15: ANON 7ffc6d8e9000-7ffc6d90afff  139264 rw---
--92903:0: aspacem  16: RSVN 7ffc6d90b000-7ffc6d972fff  425984 ----- SmFixed
--92903:0: aspacem  17: ANON 7ffc6d973000-7ffc6d974fff    8192 r-x--
--92903:0: aspacem  18: RSVN 7ffc6d975000-ffffffffff5fffff  16383e ----- SmFixed
--92903:0: aspacem  19: ANON ffffffffff600000-ffffffffff600fff    4096 r-x--
--92903:0: aspacem  20: RSVN ffffffffff601000-ffffffffffffffff      9m
----- SmFixed
--92903:0: aspacem >>>

>
>> 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).
>
> What would be the right keyword to look for? I don't seem to find anything 
> relevant with keywords: BSS, SEGMENT, etc.

Search for 0x58000000, in the corresponding platform section (should
be amd64-linux in your case).

>> 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.
>
> OK, I will try to.

Awesome! Looking forward to it.

I.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to