merlimat opened a new pull request #7132:
URL: https://github.com/apache/pulsar/pull/7132


   ### Motivation
   
   C++ references and thus cleans up all statics on exit. This can happen
   when there are still threads active. If a thread tries to access
   logging when the process is shutting down, this will possibly use a
   dead object and corrupt the heap, triggering a segfault.
   
   The solution is to make the logger factory immortal. Once it is set,
   it is assigned to an atomic static pointer, and this object is
   thereafter never cleaned up. This does change the signature for
   passing in logger factories, as shared_ptr is no longer valid.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to