Commit 6a41bc40 authored by Oleksii Mandrychenko's avatar Oleksii Mandrychenko

[#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
parent b638c71d
...@@ -159,9 +159,9 @@ private: ...@@ -159,9 +159,9 @@ private:
cell_t* const buffer_; cell_t* const buffer_;
size_t const buffer_mask_; size_t const buffer_mask_;
cacheline_pad_t pad1_; cacheline_pad_t pad1_;
std::atomic<size_t> enqueue_pos_; std::atomic<size_t> enqueue_pos_ {0};
cacheline_pad_t pad2_; cacheline_pad_t pad2_;
std::atomic<size_t> dequeue_pos_; std::atomic<size_t> dequeue_pos_ {0};
cacheline_pad_t pad3_; cacheline_pad_t pad3_;
mpmc_bounded_queue(mpmc_bounded_queue const&) = delete; mpmc_bounded_queue(mpmc_bounded_queue const&) = delete;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment