ReadMostlySharedPtrTest, subtle test bug caught by -fsanitize-address-use-after-scope
authorLouis Brandy <ldbrandy@fb.com>
Sat, 8 Apr 2017 02:38:33 +0000 (19:38 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 8 Apr 2017 02:49:33 +0000 (19:49 -0700)
commit5c04f9ac4b09ea5d85c9690b8c36bfdab28892a8
treed7b05645fc422a6bb18d6a38f22569a9c451a712
parent6ea7629b0091ebd0284106cdbfee36b80619b62f
ReadMostlySharedPtrTest, subtle test bug caught by -fsanitize-address-use-after-scope

Summary: Because these `atomic<int>` are referenced in the destructor of the `ReadMostlyMainPtr`, they must be declared before it, otherwise they are destroyed before it i.

Reviewed By: yfeldblum

Differential Revision: D4854964

fbshipit-source-id: 625a8f890bba166b682ca13558f8bcde86edcc75
folly/experimental/test/ReadMostlySharedPtrTest.cpp