forked from OSchip/llvm-project
sanitizer_common: avoid compiler-interted memset in deadlock detector
Compilers tends to insert memset/memcpy for some struct/array operations, and these don't play well inside of sanitizer runtimes. Avoiding these calls was the intention behind internal_memset. Remove the leftover ={} that can result in memset call. Reviewed By: vitalybuka, pgousseau Differential Revision: https://reviews.llvm.org/D106978
This commit is contained in:
parent
9dad34423b
commit
170a8c1284
|
@ -73,7 +73,7 @@ void DebugMutexInit() {
|
||||||
// Build adjacency matrix.
|
// Build adjacency matrix.
|
||||||
bool leaf[kMutexTypeMax];
|
bool leaf[kMutexTypeMax];
|
||||||
internal_memset(&leaf, 0, sizeof(leaf));
|
internal_memset(&leaf, 0, sizeof(leaf));
|
||||||
int cnt[kMutexTypeMax] = {};
|
int cnt[kMutexTypeMax];
|
||||||
internal_memset(&cnt, 0, sizeof(cnt));
|
internal_memset(&cnt, 0, sizeof(cnt));
|
||||||
for (int t = 0; t < kMutexTypeMax; t++) {
|
for (int t = 0; t < kMutexTypeMax; t++) {
|
||||||
mutex_type_count = t;
|
mutex_type_count = t;
|
||||||
|
|
Loading…
Reference in New Issue