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

Levels are not thread safe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Appender
    • Labels:
    • Environment:
      Windows 7, Visual Studio 2010 SP1

      Description

      Level.cpp. All default level variables are function static. This is not thread safe, especially in Visual C++ compiler.

      Here is code to reproduce the issue in VC++ 2010:

      Concurrency::parallel_for (int(0), int(10), [&](int i)
      {
      if (::log4cxx::Level::getWarn() == NULL)

      { throw std::exception(); }

      });

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tschoening Thorsten Schöning
                Reporter:
                petro Petro Protsyk
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: