>Can you try:
>valgrind --tool=massif --soname-synonyms=somalloc=NONE --trace-redir=yes \
>   -v -v -v -d -d -d ./MyProg 2>&1 | grep -i preload

When I run this command I get the following output:
[twiser@twiser-d-01 src]$ ~/programs/valgrind-3.8.1/bin/valgrind --tool=massif 
--soname-synonyms=somalloc=NONE --trace-redir=yes -v -v -v -d -d -d ./MyProg  
2>&1 | grep -i preload
--18009:2:initimg    preload_string:
--18009:2:initimg      
"/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so:/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so"


>You should then check that the files referenced by initimg exist and have 
>correct permissions (typically -rwxr-xr-x).
>If initimg is correct and files are existing and have correct permission, then 
>mystery is increasing.

They exist with the proper permissions:
[twiser@twiser-d-01 src]$ ll ~/programs/valgrind-3.8.1/lib/valgrind/vgpreload_*
-rwxr-xr-x 1 twiser twiser   8800 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so
-rwxr-xr-x 1 twiser twiser 308233 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_drd-amd64-linux.so
-rwxr-xr-x 1 twiser twiser  64150 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_exp-dhat-amd64-linux.so
-rwxr-xr-x 1 twiser twiser  93564 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_exp-sgcheck-amd64-linux.so
-rwxr-xr-x 1 twiser twiser 175014 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_helgrind-amd64-linux.so
-rwxr-xr-x 1 twiser twiser  64150 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so
-rwxr-xr-x 1 twiser twiser 162158 Nov 26 14:13 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so

>You could try the same with memcheck and see if the preload for memcheck is 
>working (and malloc replacement
>is properly done).

Using memcheck I get the following:
[twiser@twiser-d-01 src]$ ~/programs/valgrind-3.8.1/bin/valgrind 
--tool=memcheck --soname-synonyms=somalloc=NONE --trace-redir=yes -v -v -v -d 
-d -d ./MyProg  2>&1 | grep -i preload
--18018:2:initimg    preload_string:
--18018:2:initimg      
"/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so:/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so"

>You could also verify if the regression test for the static malloc replacement 
>works by doing:
>  cd memcheck/tests/
>  make static_malloc
>  algrind --tool=massif --soname-synonyms=somalloc=NONE --trace-redir=yes \
>   -v -v -v -d -d -d ./static_malloc 2>&1 | grep -i preload

I ran these with the following results:
[twiser@twiser-d-01 tests]$ make static_malloc
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../include -I../../coregrind 
-I../../include -I../../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 
-DVGPV_amd64_linux_vanilla=1   -Winline -Wall -Wshadow -g -m64 -Wno-long-long  
-Wno-pointer-sign -fno-stack-protector -MT static_malloc.o -MD -MP -MF 
.deps/static_malloc.Tpo -c -o static_malloc.o static_malloc.c
mv -f .deps/static_malloc.Tpo .deps/static_malloc.Po
gcc -Winline -Wall -Wshadow -g -m64 -Wno-long-long  -Wno-pointer-sign 
-fno-stack-protector   -o static_malloc static_malloc.o
[twiser@twiser-d-01 tests]$ ~/programs/valgrind-3.8.1/bin/valgrind 
--tool=massif --soname-synonyms=somalloc=NONE --trace-redir=yes -v -v -v -d -d 
-d ./static_malloc 2>&1 | grep -i preload
--18058:2:initimg    preload_string:
--18058:2:initimg      
"/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so:/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so"
--18058-- Reading syms from 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so
--18058--    TOPSPECS of soname NONE filename 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so
--18058-- Reading syms from 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so
--18058--    TOPSPECS of soname NONE filename 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so
--18058--    TOPSPECS of soname NONE filename 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so
--18058--    TOPSPECS of soname NONE filename 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so
--18058--    TOPSPECS of soname NONE filename 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so
--18058:1:aspacem  ( 4) 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_core-amd64-linux.so
--18058:1:aspacem  ( 5) 
/home/twiser/programs/valgrind-3.8.1/lib/valgrind/vgpreload_massif-amd64-linux.so

I'm not sure how to interpret these results.  Does all this look OK?
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to