Fix ASAN failures in OBCClient
authorAndrii Grynenko <andrii@fb.com>
Thu, 22 Jan 2015 19:07:08 +0000 (11:07 -0800)
committerwoo <woo@fb.com>
Mon, 2 Feb 2015 21:12:26 +0000 (13:12 -0800)
commit7ea7f87039a235088aaca91b03ca3e12175c52a5
treeff5e001b6b9cb6e53bc7cdd355ff492989e449d5
parent72153cdf1d938ecad9f02bc23edcb84ea67d2731
Fix ASAN failures in OBCClient

Summary:
This also adds a dependency from all folly::Singletons on RequestContext. Better fix would probaly be to switch RequestContext to be managed by folly::Singleton, however that would require us to switch all singletons which use it to be folly::Singletons too.

Facebook:
Making sure we initialize SR singletons when OBCClient singleton is created, so that SR is destoyed after OBCClient.

Test Plan:
fbconfig -r --sanitize=address --platform-all=gcc-4.8.1-glibc-2.17 dragon/
fbmake runtests

Reviewed By: meyering@fb.com, davejwatson@fb.com

Subscribers: trunkagent, folly-diffs@, meyering

FB internal diff: D1796847

Tasks: 5986816

Signature: t1:1796847:1421954531:e9ec177d5289a33c12fe0947426d89963c8e262c
folly/experimental/Singleton.cpp
folly/experimental/Singleton.h