| Age | Commit message (Collapse) | Author |
|
__cxa_atexit directly from atexit, they have different behavior.
|
|
Rationale:
The DSO handle is a required part of the (external) __cxa_atexit interface.
The atexit mapping is an implementation detail and not part of the public
interface. Doing it directly creates UB as it involves casting function
pointers between incompatible types.
-- Joerg
|
|
In the NetBSD implementation and suggested by Itanium C++ ABI, we wrap
the atexit(x) call as __cxa_atexit(x,NULL,NULL).
__cxa_atexit() is an internal function for the usage of C++.
Correct a bug that __cxa_atexit(x,y,NULL) is handled in the same way as
atexit(x) (which is simplified to __cxa_atexit(x,NULL,NULL).
This misbehavior has been detected in the Thread Sanitizer port to NetBSD.
Patch reviewed by <christos>
Sponsored by <The NetBSD Foundation>
|
|
libstdc++.
|
|
|
|
|
|
|
|
|
|
mutex, it's a good idea to convert the unlock path too so that the
recursive mutex gets released as many times as it was locked.
Fixes pthread + cxa deadlock.
|
|
|
|
just using mutex_lock() is enough.
|
|
available in the original patch.
|
|
as suggested by ad@, based on the patch provided by Sverre Froyen
in lib/37654.
Reviewed by ad@ and jmcneill@.
|
|
atexit functions, to ensure that the new functions will be called.
|
|
of pending atexit handlers before the structure is reused. This prevents
__cxa_finalize from going into an infinite loop when an atexit handler
register a new atexit handler as in:
#include <stdlib.h>
void two(void) {
}
void one(void) {
atexit(two);
}
int main(void) {
atexit(one);
return 0;
}
|
|
|
|
decrement the recursion count.
Fixes the problem of uic dying with a no-next-thread assertion while
building kdeadmin3; reported by Perry Metzger and others on
tech-pkg.
|
|
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.
|
|
as specified by the C++ ABI for Itanium. Despite the ABI document's name,
many of the items in it are implemented for other architectures.
See the following URL for a reference:
http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor
Fixes lib/18379 (from Joel Baker).
|
|
|
|
_DIAGASSERT() is still retained.
|
|
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.
the first two items result in the addition of code similar to the
following in various functions:
_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
|
|
|
|
|
|
|
|
Fix namespace issues for strtoq and strtouq
Fix gcc warnings.
Fix RCSID's
|
|
|
|
|
|
|
|
|
|
|
|
|