[libc-commits] [PATCH] D148291: [LIBC] Fix incorrect behavior with pthread_key_t when value was nullptr
    Siva Chandra via Phabricator via libc-commits 
    libc-commits at lists.llvm.org
       
    Fri Apr 14 12:29:47 PDT 2023
    
    
  
sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.
OK with inline comments addressed.
================
Comment at: libc/src/__support/threads/thread.cpp:90
 
-TSSKeyMgr tss_key_mgr;
+static TSSKeyMgr tss_key_mgr;
 
----------------
This is already in an anonymous namespace so `static` is not required.
================
Comment at: libc/test/integration/src/pthread/pthread_tss_test.cpp:33
 
-void *func(void *obj) {
+static void dtor_failure(void *) { ASSERT_TRUE(false); }
+
----------------
Add a comment explaining why this always failing assert is used here.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148291/new/
https://reviews.llvm.org/D148291
    
    
More information about the libc-commits
mailing list