|
From: Paul S. <ps...@no...> - 2005-03-26 00:40:55
|
Hi all. We're using valgrind in a UML simulator environment. As such, the tools we build are kind of cross-compiled, in that even though they are built on and run on x86 hardware, they don't build against the native libraries etc.; instead they build against a separate root filesystem with different libc (+all other libs), ld.so, etc. Even a different kernel version/kernel headers. The environment works well, and all the normal tools we build all run properly, etc. so I'm pretty confident that all the path/compile/link/runtime/etc. issues are all worked out. So, I've downloaded valgrind 2.4.0 and built it using the cross-environment and installed it into the UML root filesystem. I'm building with --disable-pie (valgrind dumps core immediately if I don't) and --with-x=no (if that matters). I can run valgrind itself and it works OK: # ./valgrind -v valgrind: no program specified valgrind: Use --help for more information. But, when I try to valgrind ANY program, even trivial ones like echo, it always fails with a segfault in ld.so: # /bin/echo hi hi # ./valgrind -v /bin/echo hi ==975== Memcheck, a memory error detector for x86-linux. ==975== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==975== Using valgrind-2.4.0, a program supervision framework for x86-linux. ==975== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==975== Valgrind library directory: /opt/msp/tools/lib/valgrind ==975== Command line ==975== /bin/echo ==975== hi ==975== Startup, with flags: ==975== -v ==975== Contents of /proc/version: ==975== Linux version 2.4.22-010xxx-1um (foo@bar) (gcc version 3.2 20020903) #1 Fri Sep 10 12:49:10 EDT 2004 ==975== Reading syms from /bin/echo (0x8048000) ==975== object doesn't have a symbol table ==975== object doesn't have any debug info ==975== Reading syms from /lib/ld-2.3.2.so (0x1B8E4000) ==975== object doesn't have any debug info ==975== Reading syms from /opt/tools/lib/valgrind/stage2 (0xB0000000) ==975== Reading syms from /lib/ld-2.3.2.so (0xB1000000) ==975== object doesn't have any debug info ==975== Reading syms from /lib/libdl-2.3.2.so (0xB1014000) ==975== object doesn't have any debug info ==975== Reading syms from /lib/libc-2.3.2.so (0xB1018000) ==975== object doesn't have a symbol table ==975== object doesn't have any debug info ==975== Reading syms from /opt/tools/lib/valgrind/vgskin_memcheck.so (0xB1256000) ==975== Reading suppressions file: /opt/tools/lib/valgrind/default.supp ==975== <...right here it waits for a long time: about a minute or so...> ==975== ==975== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==975== Access not within mapped region at address 0xBF7FFC61 ==975== at 0x1B8E4A50: (within /lib/ld-2.3.2.so) ==975== ==975== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==975== malloc/free: in use at exit: 0 bytes in 0 blocks. ==975== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==975== ==975== No malloc'd blocks -- no leaks are possible. --975-- TT/TC: 0 tc sectors discarded. --975-- 0 tt_fast misses. --975-- translate: new 0 (0 -> 0; ratio 0:10) --975-- discard 0 (0 -> 0; ratio 0:10). --975-- chainings: 0 chainings, 0 unchainings. --975-- dispatch: 0 jumps (bb entries); of them 0 (0%) unchained. --975-- 1/1 major/minor sched events. --975-- reg-alloc: 0 t-req-spill, 0+0 orig+spill uis, --975-- 0 total-reg-rank --975-- sanity: 2 cheap, 1 expensive checks. --975-- No ccalls Segmentation fault Anyone have any ideas, or pointers for me to move forward solving this problem? Thanks! -- ------------------------------------------------------------------------------- Paul D. Smith <ps...@no...> HASMAT: HA Software Mthds & Tools "Please remain calm...I may be mad, but I am a professional." --Mad Scientist ------------------------------------------------------------------------------- These are my opinions---Nortel Networks takes no responsibility for them. |