Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1698ffd0 authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent dd44f746
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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()
{