|
From: Bart V. A. <bar...@gm...> - 2006-08-12 11:40:09
|
On 8/10/06, Nicholas Nethercote <nj...@cs...> wrote: > > On Thu, 10 Aug 2006, Bart Van Assche wrote: > > > Anyone any idea where I can find documentation on recursive invocation > of > > valgrind, if this is supported ? I started working again on my drd > > (data-race detection) tool, and would like to test it with memcheck. Is > this > > possible ? > > Partly. README_DEVELOPERS has details on how to do this (under > "Self-hosting"). > > Unfortunately using Memcheck on another tool won't give you useful > results, > because we haven't added the necessary client requests to tell Memcheck > about all the nasty things Valgrind does with memory. So you'll get lots > of > false positives. > > Cachegrind works, however; that's how we got some of the speedups in > 3.2.0. > I followed the instructions in README_DEVELOPERS. Self-hosting valgrind with tool none works, but running valgrind under the tool memcheck results in a segmentation fault. Is this normal ? $ valgrind-outer-svn/inst/bin/valgrind --sim-hints=enable-inner --trace-children=yes --tool=none valgrind-inner-svn/inst/bin/valgrind --tool=none /bin/date ==30263== Nulgrind, a binary JIT-compiler. ==30263== Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote. ==30263== Using LibVEX rev 1636, a library for dynamic binary translation. ==30263== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==30263== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==30263== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==30263== For more details, rerun with: -v ==30263== ==30263== Nulgrind, a binary JIT-compiler. ==30263== Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote. ==30263== Using LibVEX rev 1636, a library for dynamic binary translation. ==30263== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==30263== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==30263== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==30263== For more details, rerun with: -v ==30263== >==30263== Nulgrind, a binary JIT-compiler. >==30263== Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote. >==30263== Using LibVEX rev 1636, a library for dynamic binary translation. >==30263== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. >==30263== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. >==30263== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. >==30263== For more details, rerun with: -v >==30263== Sat Aug 12 13:34:50 CEST 2006 >==30263== ==30263== $ valgrind-outer-svn/inst/bin/valgrind --sim-hints=enable-inner --trace-children=yes --tool=memcheck valgrind-inner-svn/inst/bin/valgrind --tool=none /bin/date ==30271== Memcheck, a memory error detector. ==30271== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==30271== Using LibVEX rev 1636, a library for dynamic binary translation. ==30271== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==30271== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==30271== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==30271== For more details, rerun with: -v ==30271== ==30271== Memcheck, a memory error detector. ==30271== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==30271== Using LibVEX rev 1636, a library for dynamic binary translation. ==30271== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==30271== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==30271== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==30271== For more details, rerun with: -v ==30271== >==30271== Nulgrind, a binary JIT-compiler. >==30271== Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote. >==30271== Using LibVEX rev 1636, a library for dynamic binary translation. >==30271== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. >==30271== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. >==30271== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. >==30271== For more details, rerun with: -v >==30271== ==30271== Invalid read of size 4 ==30271== at 0x2804CC52: vgModuleLocal_is_elf_object_file (readelf.c:112) ==30271== Address 0x38000000 is on thread 1's stack ==30271== ==30271== Invalid read of size 4 ==30271== at 0x2804CC54: vgModuleLocal_is_elf_object_file (readelf.c:116) ==30271== Address 0x38000004 is on thread 1's stack ==30271== ==30271== Invalid read of size 2 ==30271== at 0x2804CC57: vgModuleLocal_is_elf_object_file (readelf.c:119) ==30271== Address 0x38000010 is on thread 1's stack ==30271== ==30271== Invalid read of size 2 ==30271== at 0x2804CC5F: vgModuleLocal_is_elf_object_file (readelf.c:120) ==30271== Address 0x38000012 is on thread 1's stack ==30271== ==30271== Invalid read of size 4 ==30271== at 0x2804CC63: vgModuleLocal_is_elf_object_file (readelf.c:121) ==30271== Address 0x38000014 is on thread 1's stack ==30271== ==30271== Invalid read of size 2 ==30271== at 0x2804CC69: vgModuleLocal_is_elf_object_file (readelf.c:122) ==30271== Address 0x38000032 is on thread 1's stack ==30271== ==30271== Invalid read of size 4 ==30271== at 0x2804CC74: vgModuleLocal_is_elf_object_file (readelf.c:123) ==30271== Address 0x38000020 is on thread 1's stack ==30271== ==30271== Invalid read of size 2 ==30271== at 0x2804CC7A: vgModuleLocal_is_elf_object_file (readelf.c:123) ==30271== Address 0x38000030 is on thread 1's stack ==30271== ==30271== Invalid read of size 4 ==30271== at 0x2804CC88: vgModuleLocal_is_elf_object_file (readelf.c:124) ==30271== Address 0x3800001C is on thread 1's stack ==30271== ==30271== Invalid read of size 2 ==30271== at 0x2804CC8E: vgModuleLocal_is_elf_object_file (readelf.c:124) ==30271== Address 0x3800002C is on thread 1's stack ==30271== Warning: ignored attempt to set SIGRT32 handler in sigaction(); ==30271== the SIGRT32 signal is used internally by Valgrind ==30271== Warning: client switching stacks? SP change: 0x286E22A8 --> 0x51D17FF0 ==30271== to suppress, use: --max-stackframe=694377800 or greater >--30271-- VG_USERREQ__CLIENT_CALL1: func=0x0 >--30271-- VG_USERREQ__CLIENT_CALL1: func=0x0 >--30271-- VG_USERREQ__CLIENT_CALL1: func=0x0 ==30271== ==30271== Invalid read of size 1 ==30271== at 0x51D456FA: ??? ==30271== Address 0x0 is not stack'd, malloc'd or (recently) free'd >==30271== >==30271== Process terminating with default action of signal 11 (SIGSEGV) >==30271== Access not within mapped region at address 0x0 >==30271== at 0x40241CB: strcmp (mc_replace_strmem.c:340) >==30271== by 0x406F4B1: _nl_explode_name (in /lib/libc-2.4.so) >==30271== by 0x4068BB5: _nl_find_locale (in /lib/libc-2.4.so) >==30271== by 0x40683B8: setlocale (in /lib/libc-2.4.so) >==30271== by 0x80496B6: (within /bin/date) >==30271== by 0x405E87B: (below main) (in /lib/libc-2.4.so) >==30271== ==30271== ==30271== Process terminating with default action of signal 11 (SIGSEGV) ==30271== General Protection Fault ==30271== at 0x4173AD2: _pthread_cleanup_push_defer (in /lib/libpthread- 2.4.so) ==30271== by 0xBE: ??? ==30271== by 0x3: ??? ==30271== by 0x62527707: ??? ==30271== ==30271== ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0) ==30271== malloc/free: in use at exit: 0 bytes in 0 blocks. ==30271== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==30271== For counts of detected errors, rerun with: -v ==30271== All heap blocks were freed -- no leaks are possible. Segmentation fault |