From b638c71d262e296e8a7dd490fa2311006475495a Mon Sep 17 00:00:00 2001 From: Oleksii Mandrychenko Date: Wed, 29 Mar 2017 11:27:59 +0100 Subject: [PATCH] [#404] Reading past valid address with multisink logger - Initialising atomic value See examples at http://stackoverflow.com/q/36320008/706456 This issue was discovered with dr memory tool on Windows platform, Visual Studio 2015 C++ 11 --- include/spdlog/logger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 58b4841a..aec1d203 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -87,7 +87,7 @@ protected: spdlog::level_t _level; spdlog::level_t _flush_level; log_err_handler _err_handler; - std::atomic _last_err_time; + std::atomic _last_err_time {0}; // init atomic value to avoid reads of uninitialised memory }; }