Page MenuHomePhabricator

tavianator (Tavian Barnes)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 5 2016, 10:03 AM (196 w, 5 d)

Recent Activity

Oct 11 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

@rmaprath I'll merge this if needed. Feel free to commit your patch first.

Oct 11 2016, 5:32 PM

Sep 20 2016

tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

s/indended/intended/

Sep 20 2016, 8:07 AM

Sep 15 2016

tavianator added inline comments to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Sep 15 2016, 8:28 AM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Integrated @EricWF's expanded test case, and avoid an unneeded pthread_setspecific() call if the last thread_local's destructor initializes a new thread_local.

Sep 15 2016, 8:24 AM

Sep 8 2016

tavianator added inline comments to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Sep 8 2016, 1:18 PM

Sep 7 2016

tavianator added inline comments to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Sep 7 2016, 7:04 AM

Sep 6 2016

tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Uses a __thread variable to hold the destructor list, as @EricWF suggested.

Sep 6 2016, 8:52 AM

Sep 2 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

__thread

What do you think of this idea?

Sep 2 2016, 11:05 AM

Sep 1 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Ping?

Well, I still think it's fine. Maybe a direct message to @mclow.lists or @EricWF?

Sep 1 2016, 1:16 PM

Aug 31 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Ping?

Aug 31 2016, 11:49 AM

Aug 2 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Anything else I need to do for this patch?

Aug 2 2016, 6:54 AM

Jul 13 2016

tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Make sure the tail of the list is null.

Jul 13 2016, 8:17 AM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Update comments to mention that late-initialized thread_locals invoke undefined behavior.

Jul 13 2016, 6:54 AM

Jul 8 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Jul 8 2016, 8:36 AM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
  • Bring back HAVE___CXA_THREAD_ATEXIT_IMPL, and avoid the weak symbol/fallback implementation in that case
  • Fix a leak in an error path
  • Add a CreatesThreadLocalInDestructor to a non-main thread in the destructor ordering test
Jul 8 2016, 8:31 AM

Jul 5 2016

tavianator added inline comments to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Jul 5 2016, 12:13 PM

Jul 4 2016

tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Added a test case for destructor ordering. Got rid of pthread_{get,set}specific in a loop.

Jul 4 2016, 9:26 AM

Jun 30 2016

tavianator added inline comments to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Jun 30 2016, 1:17 PM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Fix copy-pasta that result in an infinite loop.

Jun 30 2016, 11:57 AM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Added missing __dso_handle declaration.

Jun 30 2016, 11:43 AM
tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

What that means for this implementation is that I think that _cxa_thread_atexit is allowed to be called during run_dtors. If running the dtor for a thread local variable 'cat', we encounter a previously unseen thread_local 'dog', the compiler will call the ctor, then register the dtor with _cxa_thread_atexit. Since it is the most recently constructed thread local object, I would expect the 'dog' dtor to be the next dtor to be run. You may be able to support this just by moving "elem = elem->next" below the dtor invocation.

Jun 30 2016, 11:34 AM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Fixed some corner cases regarding destruction order and very-late-initialized thread_locals. Explicitly documented the known limitations compared to __cxa_thread_atexit_impl().

Jun 30 2016, 11:25 AM

Jun 29 2016

tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

It also intentionally leaks the pthread key. Does the __thread_specific_ptr rationale hold for this change as well?

Jun 29 2016, 12:40 PM
tavianator added a comment to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

You should look at __thread_specific_ptr in libcxx's <thread>. It does a lot of these things in order to satisfy the requirements of notify_all_at_thread_exit, set_value_at_thread_exit, and make_ready_at_thread_exit.

Jun 29 2016, 9:02 AM
tavianator updated the diff for D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.

Added error handling for pthread_key uses

Jun 29 2016, 6:36 AM

Jun 28 2016

tavianator added inline comments to D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Jun 28 2016, 6:52 PM
tavianator retitled D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation from to [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation.
Jun 28 2016, 10:49 AM

Jan 5 2016

tavianator added inline comments to D12834: add gcc abi_tag support.
Jan 5 2016, 10:06 AM