diff --git a/cppguide.html b/cppguide.html index 788f63a..ffb061d 100644 --- a/cppguide.html +++ b/cppguide.html @@ -1044,9 +1044,12 @@ thread, rather than once at program startup. This means that other thread_local variables are subject to the same initialization-order issues as static variables (and more besides).

-

thread_local variable instances are not destroyed before their -thread terminates, so they do not have the destruction-order issues of static -variables.

+

thread_local variables have a subtle destruction-order issue: +during thread shutdown, thread_local variables will be destroyed +in the opposite order of their initialization (as is generally true in C++). +If code triggered by the destructor of any thread_local variable +refers to any already-destroyed thread_local on that thread, we will +get a particularly hard to diagnose use-after-free.