swebb2066 commented on PR #271:
URL: https://github.com/apache/logging-log4cxx/pull/271#issuecomment-1759049045

   > For each level there is a std::shared_ptr static variable which will be 
reset during the on-exit chain processing. If the Layout tries to include the 
level name using the (null) LevelPtr the application will crash.
   
   This statement is incorrect and should be:
   
   For each level there is a std::shared_ptr static variable which will be 
**deleted** during the on-exit chain processing.  If the Layout tries to 
include the level name using the (deleted) LevelPtr the application **behaviour 
is undefined.**
   
   The value of the raw pointer held in the std::shared_ptr is not set to 
nullptr in the std::shared_ptr destructor (at least for both MSVC and 
[gcc](https://github.com/gcc-mirror/gcc/tree/master)/[libstdc++-v3](https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3)).
   
   This will be preventing some crashes when logging is used after exit().
   
   


-- 
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: [email protected]

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

Reply via email to