|
From: Mathieu M. <mat...@gm...> - 2006-03-11 04:44:46
|
Hello,
Just to make sure this is correct. Could someone confirm that I can
safely add a suppression for the following(*). This is caused by the
following program(**)
I am using valgrind:
$ valgrind --version
valgrind-3.1.0-Debian
I believe this should be added in the default suppression file for debia=
n
? Or is there something smarter to do.
Thanks
Mathieu
(*)
=3D=3D15519=3D=3D 1 errors in context 3 of 3:
=3D=3D15519=3D=3D Invalid read of size 4
=3D=3D15519=3D=3D at 0x4010FA3: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x40049C1: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x400654A: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x410BCE0: dl_open_worker (dl-open.c:259)
=3D=3D15519=3D=3D by 0x400B056: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x410C5C4: _dl_open (dl-open.c:577)
=3D=3D15519=3D=3D by 0x401FD2E: dlopen_doit (dlopen.c:59)
=3D=3D15519=3D=3D by 0x400B056: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x40202FF: _dlerror_run (dlerror.c:162)
=3D=3D15519=3D=3D by 0x401FD9C: dlopen@@GLIBC_2.1 (dlopen.c:78)
=3D=3D15519=3D=3D by 0x8048603: main (test.c:7)
=3D=3D15519=3D=3D Address 0x4152038 is 16 bytes inside a block of size 17 =
alloc'd
=3D=3D15519=3D=3D at 0x401B422: malloc (vg_replace_malloc.c:149)
=3D=3D15519=3D=3D by 0x4006752: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x410BCE0: dl_open_worker (dl-open.c:259)
=3D=3D15519=3D=3D by 0x400B056: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x410C5C4: _dl_open (dl-open.c:577)
=3D=3D15519=3D=3D by 0x401FD2E: dlopen_doit (dlopen.c:59)
=3D=3D15519=3D=3D by 0x400B056: (within /lib/ld-2.3.5.so)
=3D=3D15519=3D=3D by 0x40202FF: _dlerror_run (dlerror.c:162)
=3D=3D15519=3D=3D by 0x401FD9C: dlopen@@GLIBC_2.1 (dlopen.c:78)
=3D=3D15519=3D=3D by 0x8048603: main (test.c:7)
(**)
#include <dlfcn.h>
#include <stdio.h>
int main(/*int argc , char *argv[]*/)
{
const char filename[] =3D "libz.so";
void *libhandle =3D dlopen(filename, RTLD_LAZY);
/*printf( "dlopen: %d\n", (int)libhandle);*/
if(!libhandle) return 1;
const char symbol[] =3D "gzopen";
void* address =3D dlsym(libhandle, symbol);
/*printf( "dlsym: %d\n", (int)address);*/
if(!address) return 1;
int res =3D 0;
if(libhandle)
{
res =3D !dlclose(libhandle);
}
/*printf( "dlclose: %d\n", res);*/
if(!res) return 1;
return 0;
}
--
Mathieu
|