History log of /freebsd-10.0-release/lib/libc/stdlib/atexit.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 251069 28-May-2013 emaste

Renumber clauses to reduce diffs to other versions

NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.


# 211894 27-Aug-2010 kib

Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info.

Reported and tested by: Fabian Keil <freebsd-listen fabiankeil de>
MFC after: 17 days


# 211706 23-Aug-2010 kib

On shared object unload, in __cxa_finalize, call and clear all installed
atexit and __cxa_atexit handlers that are either installed by unloaded
dso, or points to the functions provided by the dso.

Use _rtld_addr_phdr to locate segment information from the address of
private variable belonging to the dso, supplied by crtstuff.c. Provide
utility function __elf_phdr_match_addr to do the match of address against
dso executable segment.

Call back into libthr from __cxa_finalize using weak
__pthread_cxa_finalize symbol to remove any atfork handler which
function points into unloaded object.

The rtld needs private __pthread_cxa_finalize symbol to not require
resolution of the weak undefined symbol at initialization time. This
cannot work, since rtld is relocated before sym_zero is set up.

Idea by: kan
Reviewed by: kan (previous version)
MFC after: 3 weeks


# 211704 23-Aug-2010 kib

Style.

MFC after: 3 days


# 209117 12-Jun-2010 cperciva

In threaded processes, destroy the mutex atexit_mutex when we've
finished using it. This allows the mutex's allocated memory to be
freed.

This is one sense a rather silly change, since at this point we're
less than a microsecond away from calling _exit; but fixing this
memory leak is likely to make life easier for anyone trying to
track down other memory leaks.


# 165903 08-Jan-2007 imp

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


# 123673 19-Dec-2003 kan

Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendor
C++ ABI document at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor

The ABI was initially defined for ia64, but GCC3 and Intel compilers
have adopted it on other platforms.

This is the patch from PR bin/59552 with a number of changes by
me.

PR: bin/59552
Submitted by: Bradley T Hughes (bhughes at trolltech dot com)


# 92986 22-Mar-2002 obrien

Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.


# 92889 21-Mar-2002 obrien

Remove 'register' keyword.


# 91697 05-Mar-2002 tegge

When multiple threads call atexit at the same time, some operations must
be serialized. A mutex is used to protect the critical regions.

sbrk() and brk() are not thread safe. Replace use of sbrk() with
a call to malloc to avoid race when one thread calls atexit
while another thread calls malloc.

Reviewed by: deischen


# 23662 11-Mar-1997 peter

Merge Lite2 changes


# 18516 27-Sep-1996 phk

Don't use malloc, pessimize to use sbrk.
fix sbrk manpage while we're at it.


# 1574 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.


# 1573 27-May-1994 rgrimes

BSD 4.4 Lite Lib Sources