|
From: Philippe W. <phi...@sk...> - 2012-05-12 09:06:30
|
memcheck/tests/trivialleak is failing on pcc64 gcc110.
1000 blocks are clearly leaked, but 2 blocks are still found as reachable
I guess due to bad luck.
Using gdbserver "block_list" and "who_points_at", we see that one block
is reachable via the GOT segment, the other via a data symbol called cache_new.
(see below).
It is not clear to me how to fix that. The memcheck/tests/leak.h
contains a CLEAR_CALLER_SAVED_REGS but I doubt
this will clear the two unlucky references to leaked blocks.
Any idea ?
Otherwise, I guess we will need a new trivialleak .exp file, with
998 leaked blocks rather than 1000.
Philippe
(gdb) mo l f r a
==15588== 2 bytes in 2 blocks are still reachable in loss record 1 of 2
==15588== at 0x402803C: malloc (vg_replace_malloc.c:267)
==15588== by 0x1000052F: test (trivialleak.c:8)
==15588== by 0x1000058B: main (trivialleak.c:12)
==15588==
==15588== 998 bytes in 998 blocks are definitely lost in loss record 2 of 2
==15588== at 0x402803C: malloc (vg_replace_malloc.c:267)
==15588== by 0x1000052F: test (trivialleak.c:8)
==15588== by 0x1000058B: main (trivialleak.c:12)
==15588==
==15588== LEAK SUMMARY:
==15588== definitely lost: 998 bytes in 998 blocks
==15588== indirectly lost: 0 bytes in 0 blocks
==15588== possibly lost: 0 bytes in 0 blocks
==15588== still reachable: 2 bytes in 2 blocks
==15588== suppressed: 0 bytes in 0 blocks
==15588==
(gdb) mo b 1
==15588== 2 bytes in 2 blocks are still reachable in loss record 1 of 2
==15588== at 0x402803C: malloc (vg_replace_malloc.c:267)
==15588== by 0x1000052F: test (trivialleak.c:8)
==15588== by 0x1000058B: main (trivialleak.c:12)
==15588== 0x4043880[1]
==15588== 0x4045270[1]
(gdb) mo w 0x4043880
==15588== Searching for pointers to 0x4043880
==15588== *0x802cfb3008 points at 0x4043880
==15588== Address 0x802cfb3008 is 0 bytes inside data symbol "cache_new"
(gdb) mo w 0x4045270
==15588== Searching for pointers to 0x4045270
==15588== *0x403dbf8 points at 0x4045270
==15588== Address 0x403dbf8 is in the GOT segment of
/home/philippe/valgrind/trunk_untouched/memcheck/vgpreload_memcheck-ppc64-linux.so
(gdb) bt
#0 0x000000802d012110 in generic_start_main (main=@0x10010ab8: 0x10000574 <main>,
argc=<optimized out>, ubp_av=0x7ff00f228, auxvec=0x7ff00f348, init=<optimized out>,
rtld_fini=<optimized out>, stack_end=Unhandled dwarf expression opcode 0xfa
) at ../csu/libc-start.c:226
#1 0x000000802d012304 in __libc_start_main (argc=<optimized out>, ubp_av=<optimized out>,
ubp_ev=<optimized out>, auxvec=<optimized out>, rtld_fini=<optimized out>,
stinfo=<optimized out>, stack_on_entry=<optimized out>)
at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:92
#2 0x0000000000000000 in ?? ()
(gdb)
|