You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/18 03:20:47 UTC

[GitHub] [logging-log4cxx] swebb2066 edited a comment on pull request #105: Prevent static initialization order faults by using local statics

swebb2066 edited a comment on pull request #105:
URL: https://github.com/apache/logging-log4cxx/pull/105#issuecomment-1015034924


   If `static` objects are being destroyed while another thread is logging, then `APRInitializer` is also destroyed (which is bad). So all logging activity must be stopped in `Logger` before `apr_terminate()` is called. Removing the heirarchy from the `Logger` did this (except for threads active in doAppend()). 
   
   I am getting SegFault in multithreadtest on Ubuntu now with this PR. I am thinking the `const LevelPtr&` return values (i.e.  no locking in `Level::getDebug()` ) in this PR expose the case where threads active in doAppend().


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org