From: Konstantin L. <Kon...@ma...> - 2007-07-27 07:40:48
|
Hello, Fathi! You wrote to <log...@li...> on Thu, 26 Jul 2007 22:03:15 +0200: FB> nice to hear that there's an upcoming log4cpp new release. FB> i received a bug report on the debian about a threading issue: FB> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432729 FB> could someone take a look (waffel ? other?) at the submitted patch and FB> commit it if it is ok before the official release. FB> namespace log4cpp { FB> - Appender::AppenderMap* Appender::_allAppenders; FB> threading::Mutex Appender::_appenderMapMutex; FB> /* assume _appenderMapMutex locked */ FB> Appender::AppenderMap& Appender::_getAllAppenders() { FB> - if (!_allAppenders) FB> - _allAppenders = new Appender::AppenderMap(); FB> - FB> + static Appender::AppenderMap* _allAppenders = new FB> Appender::AppenderMap(); FB> return *_allAppenders; FB> } I don't see why folks thinks that it is threading issue, but I see very, very strange bug with line Appender::AppenderMap* Appender::_allAppenders; How it's works in current release I can't understand. This line should be Appender::AppenderMap* Appender::_allAppenders = 0; I have looked the bug report and don't think it is threading issue too. I think we have some problems with NDC. I will look on it closely on weekend. With best regards, Konstantin Litvinenko. |