Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-411

Crash when logging on multiple threads.

    XMLWordPrintableJSON

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

          Activity

            People

              carnold@apache.org Curt Arnold
              peterxgould Peter Gould
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: