Bug#214096: libc6: memory error in dlopen?
Package: libc6
Version: 2.3.2-8
Severity: normal
Hi!
Valgrind says a memory error in dlopen.
Example:
$ cat main.c
#include <dlfcn.h>
int main( int argc, char* argv[] )
{
void *handle;
handle = dlopen( argv[1], RTLD_LAZY );
dlclose( handle );
}
Valgrind's output:
$ valgrind --num-callers=50 ./a.out /usr/lib/libz.so
==18606== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==18606== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==18606== Using valgrind-20030725, a program supervision framework for x86-linux.
==18606== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==18606== Estimated CPU clock rate is 1004 MHz
==18606== For more details, rerun with: -v
==18606==
==18606== Conditional jump or move depends on uninitialised value(s)
==18606== at 0x40008ABA: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==18606== by 0x4035BCF0: (within /lib/libc-2.3.2.so)
==18606== by 0x4000B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==18606== by 0x4035BF5B: _dl_open (in /lib/libc-2.3.2.so)
==18606== by 0x40252FE7: (within /lib/libdl-2.3.2.so)
==18606== by 0x4000B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==18606== by 0x40253455: (within /lib/libdl-2.3.2.so)
==18606== by 0x40253033: dlopen (in /lib/libdl-2.3.2.so)
==18606== by 0x804840B: main (in /home/jk/tmp/3/a.out)
==18606== by 0x4026ADBD: __libc_start_main (in /lib/libc-2.3.2.so)
==18606== by 0x8048340: (within /home/jk/tmp/3/a.out)
==18606==
==18606== Conditional jump or move depends on uninitialised value(s)
==18606== at 0x40008B05: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==18606== by 0x4035BCF0: (within /lib/libc-2.3.2.so)
==18606== by 0x4000B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==18606== by 0x4035BF5B: _dl_open (in /lib/libc-2.3.2.so)
==18606== by 0x40252FE7: (within /lib/libdl-2.3.2.so)
==18606== by 0x4000B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==18606== by 0x40253455: (within /lib/libdl-2.3.2.so)
==18606== by 0x40253033: dlopen (in /lib/libdl-2.3.2.so)
==18606== by 0x804840B: main (in /home/jk/tmp/3/a.out)
==18606== by 0x4026ADBD: __libc_start_main (in /lib/libc-2.3.2.so)
==18606== by 0x8048340: (within /home/jk/tmp/3/a.out)
==18606== discard syms in /usr/lib/libz.so.1.1.4 due to munmap()
==18606==
==18606== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==18606== malloc/free: in use at exit: 0 bytes in 0 blocks.
==18606== malloc/free: 5 allocs, 5 frees, 695 bytes allocated.
==18606== For a detailed leak analysis, rerun with: --leak-check=yes
==18606== For counts of detected errors, rerun with: -v
--
Alexander Kogan
Institute of Applied Physics
Russian Academy of Sciences
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux forward 2.4.20-forward #1 SMP Птн Янв 24 16:19:36 MSK 2003 i686
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R
Versions of packages libc6 depends on:
ii libdb1-compat 2.1.3-7 The Berkeley database routines [gl
-- no debconf information
Reply to: