Skip to content

Commit

Permalink
Prevent use of thread specific data after destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Nov 6, 2024
1 parent ffff7db commit 3cc9e94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/cpp/threadspecificdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ThreadSpecificData::ThreadSpecificData(ThreadSpecificData&& other)

ThreadSpecificData::~ThreadSpecificData()
{
m_priv.reset();
}

NDC::Stack& ThreadSpecificData::getStack()
Expand Down
2 changes: 1 addition & 1 deletion src/main/include/log4cxx/helpers/threadspecificdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LOG4CXX_EXPORT ThreadSpecificData

/**
* Gets current thread specific data.
* @return a pointer that is never null.
* @return a pointer that is non-null prior to application exit.
*/
static ThreadSpecificData* getCurrentData();

Expand Down

0 comments on commit 3cc9e94

Please sign in to comment.