Skip Menu |
 

To: krb5-bugs@MIT.EDU
From: Ken Raeburn <raeburn@MIT.EDU>
Date: Fri, 04 Feb 2005 16:58:43 -0500
Subject: dynamic library init/fini breakage in 1.4
In the 1.4 code as shipped, most of our libraries won't have
unload-time cleanup code called if the configuration is such that we
have to implement them through linker options and not compiler
options.

This only matters a lot if dlclose is called on loaded libraries, a
case that hasn't been at the top of our priority list for testing; the
other time these functions would be invoked would be at process exit
time, when freeing up resources incrementally versus all at once
doesn't matter.

If the (not very well documented, implemented for testing, not
recommended) configuration option --disable-delayed-initialization is
used, then library initialization will fail for the same libraries.

Most library-building makefiles didn't get LIBINITFUNC/LIBFINIFUNC
specified yet. And for the krb5 library, for UNIX builds, I think two
symbols need to go in each, to deal with the profile library, which
may require rewriting some of the code going into the makefiles.

Ken
From: raeburn@mit.edu
Subject: CVS Commit
Build system support for a library having more than one init/fini symbol
defined, when using linker options to specify these functions. Now
LIBINITFUNC/LIBFINIFUNC are considered lists of symbols, ordered from
lowest-level (init run first, fini run last) to highest-level.

* lib.in (config.status): Change target to be in $thisconfigdir rather than
local.
(osf1.exports): Create a temporary file then rename into place. Add options
for library init/fini symbols, handling multiple values.

* shlib.conf (case alpha*-dec-osf*): Don't handle init/fini symbols here.
(case mips-sgi-irix*): Handle multiple init/fini symbols. Always set $initfini
before it gets used.
(case *-*-solaris*, not gcc): Handle multiple init/fini symbols.
(case *-*-aix*): Handle multiple fini symbols.


To generate a diff of this commit:



cvs diff -r5.236 -r5.237 krb5/src/config/ChangeLog
cvs diff -r5.14 -r5.15 krb5/src/config/lib.in
cvs diff -r5.35 -r5.36 krb5/src/config/shlib.conf
From: raeburn@mit.edu
Subject: CVS Commit
Fix build problem found testing certain combinations of options.

* k5-platform.h (PROGRAM_EXITING) [__GNUC__ && !_WIN32 &&
CONSTRUCTOR_ATTR_WORKS && !DELAY_INITIALIZER]: Define as zero.


To generate a diff of this commit:



cvs diff -r1.491 -r1.492 krb5/src/include/ChangeLog
cvs diff -r1.10 -r1.11 krb5/src/include/k5-platform.h
From: raeburn@mit.edu
Subject: CVS Commit
* Makefile.in (LIBINITFUNC, LIBFINIFUNC): Define.


To generate a diff of this commit:



cvs diff -r1.80 -r1.81 krb5/src/lib/gssapi/ChangeLog
cvs diff -r1.68 -r1.69 krb5/src/lib/gssapi/Makefile.in
From: raeburn@mit.edu
Subject: CVS Commit
* Makefile.in (LIBINITFUNC, LIBFINIFUNC): Define.


To generate a diff of this commit:



cvs diff -r5.115 -r5.116 krb5/src/lib/krb5/ChangeLog
cvs diff -r1.87 -r1.88 krb5/src/lib/krb5/Makefile.in
From: raeburn@mit.edu
Subject: CVS Commit
There is a memory leak here, if a thread has registered some per-thread data
when we delete the key. Fixing it will require walking through the per-thread
data of every thread and freeing the objects... and watching for deadlocks in
the case where a thread is exiting at the same time.

* threads.c (k5_key_delete) [pthread case]: Reset flags and destructor function
pointer to unset state.
(krb5int_thread_support_init, krb5int_thread_support_fini): If
SHOW_INITFINI_FUNCS is defined, print some tracing messages.


To generate a diff of this commit:



cvs diff -r1.29 -r1.30 krb5/src/util/support/ChangeLog
cvs diff -r1.17 -r1.18 krb5/src/util/support/threads.c
Memory leak recorded in ticket 2917.
From: tlyu@mit.edu
Subject: CVS Commit
pullup from trunk


To generate a diff of this commit:



cvs diff -r5.229.4.4 -r5.229.4.5 krb5/src/config/ChangeLog
cvs diff -r5.14 -r5.14.4.1 krb5/src/config/lib.in
cvs diff -r5.34.4.1 -r5.34.4.2 krb5/src/config/shlib.conf
cvs diff -r1.471.2.8 -r1.471.2.9 krb5/src/include/ChangeLog
cvs diff -r1.10 -r1.10.4.1 krb5/src/include/k5-platform.h
cvs diff -r1.77.4.1 -r1.77.4.2 krb5/src/lib/gssapi/ChangeLog
cvs diff -r1.67 -r1.67.4.1 krb5/src/lib/gssapi/Makefile.in
cvs diff -r5.111.4.2 -r5.111.4.3 krb5/src/lib/krb5/ChangeLog
cvs diff -r1.84 -r1.84.4.1 krb5/src/lib/krb5/Makefile.in
cvs diff -r1.19.2.3 -r1.19.2.4 krb5/src/util/support/ChangeLog
cvs diff -r1.11.4.2 -r1.11.4.3 krb5/src/util/support/threads.c