[#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
This commit is contained in:
Oleksii Mandrychenko 2017-03-29 13:53:11 +01:00
parent b638c71d26
commit 6a41bc40af
1 changed files with 2 additions and 2 deletions

View File

@ -159,9 +159,9 @@ private:
cell_t* const buffer_;
size_t const buffer_mask_;
cacheline_pad_t pad1_;
std::atomic<size_t> enqueue_pos_;
std::atomic<size_t> enqueue_pos_ {0};
cacheline_pad_t pad2_;
std::atomic<size_t> dequeue_pos_;
std::atomic<size_t> dequeue_pos_ {0};
cacheline_pad_t pad3_;
mpmc_bounded_queue(mpmc_bounded_queue const&) = delete;