|
From: Joseph W. <jos...@ma...> - 2009-06-09 12:58:20
|
With version svn 10277 and valgrind 3.4.1 on an x86_64, I have a program that crashes callgrind but works just fine under memcheck. Here's the result from running vg-in-place: $ ~/src/Tools/VALGRIND/RemoteSVN/valgrind/vg-in-place --tool=callgrind --num-callers=50 --show-emwarns=yes --smc-check=all bin/Test1.exe ==15141== Callgrind, a call-graph generating cache profiler. ==15141== Copyright (C) 2002-2009, and GNU GPL'd, by Josef Weidendorfer et al. ==15141== Using LibVEX rev 1899, a library for dynamic binary translation. ==15141== Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP. ==15141== Using valgrind-3.5.0.SVN, a dynamic binary instrumentation framework. ==15141== Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al. ==15141== For more details, rerun with: -v ==15141== ==15141== For interactive control, run 'callgrind_control -h'. /glb/home/usjwiv/src/Tools/VALGRIND/RemoteSVN/valgrind/vg-in-place: line 28: 15141 Segmentation fault VALGRIND_LIB="$vgbasedir/.in_place" VALGRIND_LIB_INNER="$vgbasedir/.in_place" "$vgbasedir/coregrind/valgrind" "$@" Here's what happens when I run callgrind inside of gdb: $ setenv VALGRIND_LAUNCHER ~/src/Tools/VALGRIND/RemoteSVN/valgrind/coregrind/valgrind $ gdb ~/src/Tools/VALGRIND/RemoteSVN/valgrind/.in_place/callgrind-amd64-linux GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu"... (gdb) handle SIGILL SIGSEGV nostop noprint Signal Stop Print Pass to program Description SIGILL No No Yes Illegal instruction SIGSEGV No No Yes Segmentation fault (gdb) run --num-callers=50 --show-emwarns=yes --smc-check=all bin/Test1.exe Starting program: /scratch/jody/src/Tools/VALGRIND/RemoteSVN/valgrind/.in_place/callgrind-amd64-linux --num-callers=50 --show-emwarns=yes --smc-check=all bin/Test1.exe ==16049== Callgrind, a call-graph generating cache profiler. ==16049== Copyright (C) 2002-2009, and GNU GPL'd, by Josef Weidendorfer et al. ==16049== Using LibVEX rev 1899, a library for dynamic binary translation. ==16049== Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP. ==16049== Using valgrind-3.5.0.SVN, a dynamic binary instrumentation framework. ==16049== Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al. ==16049== For more details, rerun with: -v ==16049== ==16049== For interactive control, run 'callgrind_control -h'. --16049-- VG_USERREQ__CLIENT_CALL1: func=0x0 Operating system error: Success Memory allocation failed ==16049== ==16049== Events : Ir ==16049== Collected : 78018391 ==16049== ==16049== I refs: 78,018,391 Program exited with code 01. (gdb) Just for completeness, here is the results of memcheck: $ ~/src/Tools/VALGRIND/RemoteSVN/valgrind/.in_place/memcheck-amd64-linux --num-callers=50 --show-emwarns=yes --smc-check=all bin/Test1.exe ==16587== Memcheck, a memory error detector. ==16587== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==16587== Using LibVEX rev 1899, a library for dynamic binary translation. ==16587== Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP. ==16587== Using valgrind-3.5.0.SVN, a dynamic binary instrumentation framework. ==16587== Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al. ==16587== For more details, rerun with: -v ==16587== ==16587== Conditional jump or move depends on uninitialised value(s) ==16587== at 0x4907107: strlen (mc_replace_strmem.c:275) ==16587== by 0xDF485A0: sgygtn_f (in /scratch/jody/work/SVN/branches/2009.1/3rdparty/SIPMAP/200901/Linux64/siplib/libSipmapShell.so.9.1) ==16587== by 0x7FEFFC67F: ??? ==16587== ==16587== Conditional jump or move depends on uninitialised value(s) ==16587== at 0x4907107: strlen (mc_replace_strmem.c:275) ==16587== by 0xDF485A0: sgygtn_f (in /scratch/jody/work/SVN/branches/2009.1/3rdparty/SIPMAP/200901/Linux64/siplib/libSipmapShell.so.9.1) ==16587== by 0x7FEFFC6A7: ??? ==16587== ==16587== Conditional jump or move depends on uninitialised value(s) ==16587== at 0x4907107: strlen (mc_replace_strmem.c:275) ==16587== by 0xDF485A0: sgygtn_f (in /scratch/jody/work/SVN/branches/2009.1/3rdparty/SIPMAP/200901/Linux64/siplib/libSipmapShell.so.9.1) ==16587== by 0x7FEFFB947: ??? 13:01:36 DEBUG: SpBTFFileManager::buildLookupTable: Search radius for ../../../Data/synth_XY.ssf lookup tables = 212.132 XXX no SpBTFFileManager::BDFInfo ==16587== ==16587== ERROR SUMMARY: 36 errors from 3 contexts (suppressed: 10 from 5) ==16587== malloc/free: in use at exit: 3,231,557 bytes in 1,785 blocks. ==16587== malloc/free: 135,975 allocs, 134,190 frees, 13,558,729 bytes allocated. ==16587== For counts of detected errors, rerun with: -v ==16587== Use --track-origins=yes to see where uninitialised values come from ==16587== searching for pointers to 1,785 not-freed blocks. ==16587== checked 126,070,344 bytes. ==16587== ==16587== LEAK SUMMARY: ==16587== definitely lost: 45,240 bytes in 18 blocks. ==16587== indirectly lost: 1,126 bytes in 5 blocks. ==16587== possibly lost: 17,333 bytes in 304 blocks. ==16587== still reachable: 3,167,858 bytes in 1,458 blocks. ==16587== suppressed: 0 bytes in 0 blocks. ==16587== Rerun with --leak-check=full to see details of leaked memory. What hints can you give me so that I can actually identify what the problem is? Thanks, Jody |