You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by "Thorsten Schöning (JIRA)" <lo...@logging.apache.org> on 2014/03/10 08:15:43 UTC

[jira] [Closed] (LOGCXX-411) Crash when logging on multiple threads.

     [ https://issues.apache.org/jira/browse/LOGCXX-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Schöning closed LOGCXX-411.
------------------------------------

    Resolution: Fixed

Fixed this in LOGCXX-394.

> Crash when logging on multiple threads.
> ---------------------------------------
>
>                 Key: LOGCXX-411
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-411
>             Project: Log4cxx
>          Issue Type: Bug
>            Reporter: Peter Gould
>            Assignee: Curt Arnold
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)