libbinder: do not destruct SM global
Let linux clean it up, since this may be accessed by some threads after the main thread is destructed. Bug: 154507808 # longterm Bug: 156785633 Test: w/ repro which calls defaultServiceManager off main thread Change-Id: Ic109f4bdca3893e6b0b192ac27f3ff03ada6f9e2
This commit is contained in:
parent
dd44f7465d
commit
1698ffd088
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ private:
|
|||
sp<AidlServiceManager> mTheRealServiceManager;
|
||||
};
|
||||
|
||||
static std::once_flag gSmOnce;
|
||||
static sp<IServiceManager> gDefaultServiceManager;
|
||||
[[clang::no_destroy]] static std::once_flag gSmOnce;
|
||||
[[clang::no_destroy]] static sp<IServiceManager> gDefaultServiceManager;
|
||||
|
||||
sp<IServiceManager> defaultServiceManager()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue