[ https://issues.apache.org/jira/browse/LOGCXX-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15607820#comment-15607820 ]
Thorsten Schöning edited comment on LOGCXX-394 at 10/26/16 8:10 AM: -------------------------------------------------------------------- The changes to Level in this bug lead to memory leaks, as reported by a user in the following thread: http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/201610.mbox/<516ac3df-9119-3dc0-b7c7-5eba797a4ea5%40visualact.se> I currently don't reopen the bug because we accept leaks in other bugs like LOGCXX-322 in APRInitializer as well and getting the lib better usable in multi-threaded apps seems more important in my mind than those leaks. If anyone has a better workaround/solution with not leaking, which fixes this bug, feel free to add some note. was (Author: tschoening): The changes to Level in this bug lead to memory leaks, as reported by a user in the following thread: http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/201610.mbox/<516ac3df-9119-3dc0-b7c7-5eba797a4ea5%40visualact.se> I currently don't reopen the bug because we accept leaks in other bugs like LOGCXX-322 in APRInitializer as well and getting the lib better usable in multi-threaded apps seems more important in my mind than those leaks. If anyone has a better workaround/solution with not leaking, which fixes this bug, I would happily hear them. > Levels are not thread safe > -------------------------- > > Key: LOGCXX-394 > URL: https://issues.apache.org/jira/browse/LOGCXX-394 > Project: Log4cxx > Issue Type: Bug > Components: Appender > Environment: Windows 7, Visual Studio 2010 SP1 > Reporter: Petro Protsyk > Assignee: Thorsten Schöning > Priority: Minor > Labels: thread-safety > > 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(); > } > }); -- This message was sent by Atlassian JIRA (v6.3.4#6332)