Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
The following code extract causes a crash within a multi threaded environment
LevelPtr Level::getFatal() {
static LevelPtr level(new Level(Level::FATAL_INT, LOG4CXX_STR("FATAL"), 0));
return Fatallevel;
}
File level.cpp file. If two threads call this simultaneously or any of the other Level::getXXXX functions, the second thread may get a null pointer returned if the first thread is still constructing the static LevelPtr level object.
Attachments
Issue Links
- duplicates
-
LOGCXX-394 Levels are not thread safe
- Resolved