|
From: Simon J. <ja...@ex...> - 2003-11-30 15:20:32
|
Hello,
I'm using valgrind from Debian, --version says valgrind-20031012.
When trying it on GNU Shishi I have discovered a weird problem. Below
is what happens. If I link with -lgnutls, -lgcrypt, -lgpg-error
-lidn, or -lz instead of -lshishi valgrind do not complain, so the
problem appear to be triggered by -lshishi and not any other library
that is loaded by -lshishi. What could possibly cause this? The
library isn't invoked from main, and I don't use any weird shared
library hooks in -lshishi as far as I'm aware. If I link with 'gcc -o
foo foo.c /usr/local/lib/libshishi.a' valgrind does not complain
tough.
Thanks,
Simon
gcc (GCC) 3.3.2 (Debian)
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
jas@latte:~$ cat>foo.c
#include <stdio.h>
int main()
{
puts("foo");
}
jas@latte:~$ gcc -o foo foo.c -lshishi
jas@latte:~$ valgrind -v ./foo
==3654== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==3654== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==3654== Using valgrind-20031012, a program supervision framework for x86-linux.==3654== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==3654== Command line:
==3654== ./foo
==3654== Startup, with flags:
==3654== --suppressions=/usr/lib/valgrind/default.supp
==3654== -v
==3654== Reading syms from /home/jas/foo
==3654== Reading syms from /lib/ld-2.3.2.so
==3654== object doesn't have a symbol table
==3654== object doesn't have any debug info
==3654== Reading syms from /usr/lib/valgrind/vgskin_memcheck.so
==3654== Reading syms from /usr/lib/valgrind/valgrind.so
==3654== Reading syms from /home/jas/lib/libshishi.so.0.0.9
==3654== Reading syms from /lib/libc-2.3.2.so
==3654== object doesn't have a symbol table
==3654== object doesn't have any debug info
==3654== Reading syms from /usr/lib/libz.so.1.1.4
==3654== object doesn't have a symbol table
==3654== object doesn't have any debug info
==3654== Reading syms from /home/jas/lib/libgnutls.so.8.1.97
==3654== Reading syms from /home/jas/lib/libgcrypt.so.7.3.0
==3654== Reading syms from /home/jas/lib/libgpg-error.so.0.1.1
==3654== Reading syms from /home/jas/lib/libidn.so.11.1.2
==3654== Reading syms from /lib/libresolv-2.3.2.so
==3654== object doesn't have a symbol table
==3654== object doesn't have any debug info
==3654== Reading syms from /lib/libnsl-2.3.2.so
==3654== object doesn't have a symbol table
==3654== object doesn't have any debug info
==3654== Reading suppressions file: /usr/lib/valgrind/default.supp
==3654== Estimated CPU clock rate is 2833 MHz
==3654==
foo
==3654== Invalid free() / delete / delete[]
==3654== at 0x4002CD17: free (vg_replace_malloc.c:231)
==3654== by 0x403AEAAB: (within /lib/libc-2.3.2.so)
==3654== by 0x403AE7F4: __libc_freeres (in /lib/libc-2.3.2.so)
==3654== by 0x4018B3C5: vgPlain___libc_freeres_wrapper (vg_intercept.c:831)
==3654== Address 0x4049B5C0 is not stack'd, malloc'd or free'd
==3654==
==3654== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==3654==
==3654== 1 errors in context 1 of 1:
==3654== Invalid free() / delete / delete[]
==3654== at 0x4002CD17: free (vg_replace_malloc.c:231)
==3654== by 0x403AEAAB: (within /lib/libc-2.3.2.so)
==3654== by 0x403AE7F4: __libc_freeres (in /lib/libc-2.3.2.so)
==3654== by 0x4018B3C5: vgPlain___libc_freeres_wrapper (vg_intercept.c:831)
==3654== Address 0x4049B5C0 is not stack'd, malloc'd or free'd
==3654== IN SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==3654==
==3654== malloc/free: in use at exit: 0 bytes in 0 blocks.
==3654== malloc/free: 0 allocs, 1 frees, 0 bytes allocated.
==3654==
--3654-- TT/TC: 0 tc sectors discarded.
--3654-- 336 chainings, 0 unchainings.
--3654-- translate: new 911 (11780 -> 172397; ratio 146:10)
--3654-- discard 0 (0 -> 0; ratio 0:10).
--3654-- dispatch: 0 jumps (bb entries), of which 1562 (156200%) were unchained.
--3654-- 2/920 major/minor sched events. 912 tt_fast misses.
--3654-- reg-alloc: 87 t-req-spill, 33033+496 orig+spill uis, 4231 total-reg-r.
--3654-- sanity: 3 cheap, 1 expensive checks.
--3654-- ccalls: 3595 C calls, 61% saves+restores avoided (12960 bytes)
--3654-- 4589 args, avg 0.87 setup instrs each (1138 bytes)
--3654-- 0% clear the stack (10785 bytes)
--3654-- 1339 retvals, 34% of reg-reg movs avoided (904 bytes)
jas@latte:~$
|