Commit 580c1197 authored by Dave Watson's avatar Dave Watson Committed by Facebook Github Bot

Fix ThreadCachedInts init

Summary: The domain tests seem broken.  Digging in, it seems to be uninitialized ThreadCachedInts variables.  Initialize them.

Reviewed By: yfeldblum

Differential Revision: D7505520

fbshipit-source-id: aca8a6f5b38271bf06ea8a6377bfb692328f1e33
parent d2600ef7
...@@ -36,8 +36,8 @@ namespace detail { ...@@ -36,8 +36,8 @@ namespace detail {
template <typename Tag> template <typename Tag>
class ThreadCachedInts { class ThreadCachedInts {
std::atomic<int64_t> orphan_inc_[2]; std::atomic<int64_t> orphan_inc_[2] = {};
std::atomic<int64_t> orphan_dec_[2]; std::atomic<int64_t> orphan_dec_[2] = {};
folly::detail::Futex<> waiting_{0}; folly::detail::Futex<> waiting_{0};
class Integer { class Integer {
......
...@@ -171,7 +171,7 @@ TEST(RcuTest, Synchronize) { ...@@ -171,7 +171,7 @@ TEST(RcuTest, Synchronize) {
TEST(RcuTest, NewDomainTest) { TEST(RcuTest, NewDomainTest) {
struct UniqueTag; struct UniqueTag;
rcu_domain<UniqueTag> newdomain(nullptr); rcu_domain<UniqueTag> newdomain(nullptr);
synchronize_rcu(); synchronize_rcu(&newdomain);
} }
TEST(RcuTest, NewDomainGuardTest) { TEST(RcuTest, NewDomainGuardTest) {
......
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