about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-01-20 11:08:37 +0000
committerbors <bors@rust-lang.org>2019-01-20 11:08:37 +0000
commitd38d6be336e87055d90375c981806d5d133f446a (patch)
tree633c25a2d88501d0fe178f944055264d5a36d1c9 /src/rustllvm/RustWrapper.cpp
parent2ab5d8ac447f1f3f865dbae5bafbdeacacdea6d9 (diff)
parent1a51bb8174e97251a37fcd83ff8750b7773e762a (diff)
downloadrust-d38d6be336e87055d90375c981806d5d133f446a.tar.gz
rust-d38d6be336e87055d90375c981806d5d133f446a.zip
Auto merge of #57655 - mtak-:fix-tls-dtors-macos, r=alexcrichton
OSX: fix #57534 registering thread dtors while running thread dtors

r? @alexcrichton

- "fast" `thread_local` destructors get run even on the main thread
- "fast" `thread_local` dtors, can initialize other `thread_local`'s

One corner case where this fix doesn't work, is when a C++ `thread_local` triggers the initialization of a rust `thread_local`.

I did not add any std::thread specific flag to indicate that the thread is currently exiting, which would be checked before registering a new dtor (I didn't really know where to stick that). I think this does the trick tho!

Let me know if anything needs tweaking/fixing/etc.

resolves this for macos: https://github.com/rust-lang/rust/issues/28129
fixes: https://github.com/rust-lang/rust/issues/57534
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions