You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the dynamic link file with dlopen and dlclose, the process' pthread_key_t will be exhausted and the process will crash when call std::thread.
Because the destructor , in the file thread, is empty,__thread_specific_ptr<_Tp>::~__thread_specific_ptr.
In fact, the destructor is not necessary left to be empty, because there only one static __thread_specific_ptr<_Tp> object in the dynamic link file, which is defined in the function __thread_local_data(). When calling dlclose(),the static object will be released and the pthread_key_t should be released too.
The text was updated successfully, but these errors were encountered:
When I use the dynamic link file with dlopen and dlclose, the process' pthread_key_t will be exhausted and the process will crash when call std::thread.
Because the destructor , in the file thread, is empty,__thread_specific_ptr<_Tp>::~__thread_specific_ptr.
In fact, the destructor is not necessary left to be empty, because there only one static __thread_specific_ptr<_Tp> object in the dynamic link file, which is defined in the function __thread_local_data(). When calling dlclose(),the static object will be released and the pthread_key_t should be released too.
The text was updated successfully, but these errors were encountered: