You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/01 19:07:43 UTC

[GitHub] [pulsar] merlimat opened a new pull request #7132: [C++] logging factory should be stored as static shared_ptr

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:
users@infra.apache.org



[GitHub] [pulsar] merlimat merged pull request #7132: [C++] logging factory should be stored as static shared_ptr

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #7132:
URL: https://github.com/apache/pulsar/pull/7132


   


----------------------------------------------------------------
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:
users@infra.apache.org