Subject: CVS commit: src/lib/libc/stdlib
To: None <firstname.lastname@example.org>
From: Jason R Thorpe <email@example.com>
Date: 03/04/2003 20:09:49
Module Name: src
Committed By: thorpej
Date: Tue Mar 4 18:09:48 UTC 2003
A dynamically linked program invokes the rtld cleanup routine via
an atexit handler. This rtld cleanup routine invokes _fini() for
shared libraries, which in-turn invoke __cxa_finalize() with their
DSO handle. By luck, this happens to work okay for non-threaded
programs, but for a threaded program, this leads to deadlock (sometimes
manifested as an assertion failure, if the program didn't actually
create any threads).
Fixed by teaching __cxa_finalize() that it can be recursively invoked,
adjusting the handler list manipulation accordingly.
To generate a diff of this commit:
cvs rdiff -r1.14 -r1.15 src/lib/libc/stdlib/atexit.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.