[PATCH] D39619: Correct atexit(3) support in TSan/NetBSD
Dmitry Vyukov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 6 00:58:08 PST 2017
dvyukov added a comment.
Doesn't __cxa_atexit call callbacks in the same order as atexit? You said that atexit is implemented by means of __cxa_atexit.
As far as I remember, __cxa_atexit is called with dso=0 for destructors in main executable. If so, order of execution will depend on if the dtor is in main executable or not, which looks wrong.
Is it really necessary to use different call mechanisms? Please add a test for LIFO atexit order, if it works then we can keep the current code.
Re InternalReallocArr, we already have Vector<T> class in tsan_vector.h for this. So if this code is really necessary, we should use Vector (probably will require declaring ctor as constexpr if we need a global instance).
Repository:
rL LLVM
https://reviews.llvm.org/D39619
More information about the llvm-commits
mailing list