[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
memory initialisation error in libtool-1.4
From: |
Alexander Bluhm |
Subject: |
memory initialisation error in libtool-1.4 |
Date: |
Mon, 28 May 2001 23:07:11 +0200 |
User-agent: |
Mutt/1.2.5i |
Hi,
I had some problems using libtool-1.4 under Solaris 8.
The call to lt_dlclose() failed. I have found that the LT_DLRESIDENT_FLAG
is always set in handle->flags. The reason is, that during lt_dlopen()
the memory of the handle struct is not correctly initialized.
Ich have added some memset() to the ltdl.c file to fix the problem.
The patch and the configure output is included.
Alexander
--- libtool-1.4/libltdl/ltdl.c.orig Wed Apr 25 00:45:56 2001
+++ libtool-1.4/libltdl/ltdl.c Mon May 28 22:54:28 2001
@@ -1154,10 +1154,11 @@
}
tmp = LT_DLMALLOC (lt_dlsymlists_t, 1);
if (tmp)
{
+ memset (tmp, 0, 1*sizeof(lt_dlsymlists_t));
tmp->syms = preloaded;
tmp->next = preloaded_symbols;
preloaded_symbols = tmp;
}
else
@@ -2021,14 +2022,11 @@
{
MUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY));
return 0;
}
- handle->info.ref_count = 0;
- handle->depcount = 0;
- handle->deplibs = 0;
- handle->caller_data = 0;
+ memset (handle, 0, 1*sizeof(struct lt_dlhandle_struct));
newhandle = handle;
/* lt_dlclose()ing yourself is very bad! Disallow it. */
LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG);
@@ -2264,11 +2262,11 @@
free_vars (dlname, old_name, libdir, deplibs);
/* handle is already set to 0 */
goto cleanup;
}
- handle->info.ref_count = 0;
+ memset (handle, 0, 1*sizeof(struct lt_dlhandle_struct));
if (load_deplibs (handle, deplibs) == 0)
{
newhandle = handle;
/* find_module may replace newhandle */
if (find_module (&newhandle, dir, libdir, dlname, old_name,
installed))
./config.guess
sparc-sun-solaris2.8
./configure --enable-ltdl-convenience
--prefix=/export/home/alexb/src/xdb/xdb++-40/src/foreign
creating cache ./config.cache
checking for a BSD compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking whether gmake sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking host system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
checking for Cygwin environment... no
checking for mingw32 environment... no
checking how to run the C preprocessor... gcc -E
checking for /usr/ccs/bin/ld option to reload object files... -r
checking how to recognise dependant libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/ccs/bin/nm -p output... ok
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo...
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... solaris2.8 ld.so
checking if libtool supports shared libraries... yes
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
creating libtool
updating cache ./config.cache
creating ./config.status
creating Makefile
creating doc/Makefile
creating tests/Makefile
configuring in libltdl
running /bin/sh ./configure --enable-ltdl-convenience
--prefix=/export/home/alexb/src/xdb/xdb++-40/src/foreign --enable-ltdl-install
--cache-file=.././config.cache --srcdir=.
loading cache .././config.cache
checking for a BSD compatible install... ./../install-sh -c
checking whether build environment is sane... yes
checking whether gmake sets ${MAKE}... (cached) yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for working const... yes
checking for inline... inline
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking how to run the C preprocessor... (cached) gcc -E
checking host system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
checking for ld used by GCC... (cached) /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... (cached) no
checking for /usr/ccs/bin/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/ccs/bin/nm -p
checking whether ln -s works... (cached) yes
checking how to recognise dependant libraries... (cached) pass_all
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking command to parse /usr/ccs/bin/nm -p output... (cached) ok
checking for dlfcn.h... (cached) yes
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking for objdir... .libs
checking for gcc option to produce PIC... (cached) -fPIC
checking if gcc PIC flag -fPIC works... (cached) yes
checking if gcc static flag -static works... (cached) yes
checking if gcc supports -c -o file.o... (cached) yes
checking if gcc supports -c -o file.lo... (cached)
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... solaris2.8 ld.so
checking if libtool supports shared libraries... yes
creating libtool
checking for ANSI C header files... yes
checking which extension is used for shared libraries... .so
checking which variable specifies run-time library path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for dlopen in -ldl... (cached) yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dld_link in -ldld... no
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for malloc.h... yes
checking for memory.h... yes
checking for stdlib.h... yes
checking for stdio.h... yes
checking for ctype.h... yes
checking for dl.h... no
checking for sys/dl.h... yes
checking for dld.h... no
checking for string.h... yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for strcmp... yes
updating cache .././config.cache
creating ./config.status
creating Makefile
creating config.h
config.h is unchanged
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- memory initialisation error in libtool-1.4,
Alexander Bluhm <=