Merge "WVCdm: no destroy global log buffer on exit" into tm-dev am: 5c38b38514 am: 470f49f87c

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17570520

Change-Id: Icb1e0942b54fa39ffb541b22a04d0ab2ead8e917
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Robert Shih
2022-04-27 22:09:13 +00:00
committed by Automerger Merge Worker

View File

@@ -57,7 +57,11 @@ int64_t GetCurrentTimeMs() {
LogPriority g_cutoff = CDM_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;