From: Vignesh <mv...@ya...> - 2014-06-02 14:05:49
|
Thank you for your clues. Few dynamically loaded libraries were statically linked to few other libraries. After converting them to dynamic libraries, I am closer to detect memory problems. Also, I had to turn on -g and avoid stripping the executable to get an accurate detection However, this still dazzles me: I still get this warning while running valgrind: --8925-- Considering /system/lib/libc.so .. --8925-- .. CRC mismatch (computed aedb52cb wanted eadc3e5a) --8925-- object doesn't have a symbol table When I compute crc for /system/lib/libc.so externally, I get aedb52cb and the system under test doesn't contain libc anywhere else.. Where else is the executable picking libc from? Output of strace relevant to libc given below open("/vendor/lib/libc.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/system/lib/libc.so", O_RDONLY) = 3 open("/vendor/lib/libc.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/system/lib/libc.so", O_RDONLY) = 3 readlink("/proc/self/fd/3", "/system/lib/libc.so", 4096) = 19 stat64("/system/lib/libc.so", {st_mode=S_IFREG|0666, st_size=310652, ...}) = 0 readlink("/proc/self/fd/3", "/system/lib/libc.so", 4096) = 19 stat64("/system/lib/libc.so", {st_mode=S_IFREG|0666, st_size=310652, ...}) = 0 readlink("/proc/self/fd/3", "/system/lib/libc.so", 4096) = 19 stat64("/system/lib/libc.so", {st_mode=S_IFREG|0666, st_size=310652, ...}) = 0 --9086-- Reading syms from /system/lib/libc.so open("/system/lib/libc.so", O_RDONLY) = 4 readlink("/proc/self/fd/4", "/system/lib/libc.so", 4096) = 19 open("/system/lib/libc.so", O_RDONLY) = 4 --9086-- Considering /system/lib/libc.so .. readlink("/proc/self/fd/4", "/system/lib/libc.so", 4096) = 19 open("/system/lib/.debug/libc.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/debug/system/lib/libc.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/data/local/symbols/system/lib/libc.so", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sdcard/symbols/system/lib/libc.so", O_RDONLY) = -1 ENOENT (No such file or directory) --9086:1:aspacem ( 4) /system/lib/libc.so --9086-- Caught __NR_exit; running __libc_freeres() Thank you, Vignesh On Tuesday, 27 May 2014, 19:01, John Reiser <jr...@Bi...> wrote: > --16527-- Considering /system/lib/libc.so .. > --16527-- .. CRC mismatch (computed aedb52cb wanted eadc3e5a) > --16527-- object doesn't have a symbol table The checksums mismatch, so memcheck ignores the symbols [if there are any.] Therefore 'malloc' and 'free' cannot be found. Most often this is a clue that the software on the target machine is not installed properly. Run "strace -f -e trace=file valgrind ..." and see exactly which files memcheck wants. Look at all files that are reported by strace whose names contain the substring "libc", and determine what kind of symbol tables they contain: SHT_SYMTAB, DT_SYMTAB (with DT_HASH or DT_GNU_HASH). Figure out why the CRC mismatches. Check version numbers, date-last-modified ("ls -l"), etc. Compare output of "readelf --all <filename>" for all candidates. Install the correct file(s) so that the message "CRC mismatch" no longer appears. ------------------------------------------------------------------------------ The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |