WVCdm: no destroy global log buffer on exit

[ Merge of go/wvgerrit/149989 ]

Bug: 227848537
Change-Id: I9407b133654c20ddcd3c15404dd19b3719064e6e
Test: Irdeto monkey test
This commit is contained in:
Robert Shih
2022-04-05 00:44:38 +00:00
parent 8d3d0b60b4
commit fe9185c0ea

View File

@@ -53,7 +53,11 @@ int64_t GetCurrentTimeMs() {
LogPriority g_cutoff = LOG_VERBOSE;
LogBuffer g_logbuf;
// This LogBuffer instance shares its mutex with multiple
// threads which might not release the mutex if suddenly closed
// by a signal. Destroying an in-use mutex may cause a process
// crash. Leave memory clean to the kernel when the process exits.
[[clang::no_destroy]] LogBuffer g_logbuf;
thread_local bool tl_logging_uid_set_ = false;