|
From: John R. <jr...@bi...> - 2019-05-12 19:33:01
|
On 5/12/19 8:15 AM, Philippe Waroquiers wrote: > Currently, in an error, valgrind outputs a description such as: > ==18039== Address 0x51d8048 is 8 bytes inside a block of size 15 alloc'd > ==18039== at 0x4C2BF3D: malloc (vg_replace_malloc.c:309) > ==18039== by 0x108751: main (badpoll.c:12) > > > Here follows some possible ways to show the block address in the first line: > ==18039== Address 0x51d8048 is 8 bytes inside a block (0x51d8040) of size 15 alloc'd > > ==18039== Address 0x51d8048 is 8 bytes inside a block at 0x51d8040 of size 15 alloc'd > > ==18039== Address 0x51d8048 is 8 bytes inside a block address 0x51d8040 of size 15 alloc'd > > Feedback ? This is a good idea! It allows correlation with vgdb and other tools, and sometimes even between consecutive runs (requires some determinism.) > Other suggestions ? I also like ==18039== Address 0x51d8048 is 8 bytes inside [0x51d8040, +15) alloc'd using the notation for "closed (inclusive) on the lower end, open (exclusive) on the higher end". |