diff options
author | Eugene Leviant <eleviant@accesssoftek.com> | 2019-07-28 08:58:44 +0000 |
---|---|---|
committer | Eugene Leviant <eleviant@accesssoftek.com> | 2019-07-28 08:58:44 +0000 |
commit | 45d910de994098142d6e8ffae94963df0f649dc2 (patch) | |
tree | 8892c8af44011f4eebf1ef18efb9fe55083bf8f7 /compiler-rt | |
parent | e7bea9b73a586b7e8f12e5ff1c80228d0767b5c8 (diff) | |
download | bcm5719-llvm-45d910de994098142d6e8ffae94963df0f649dc2.tar.gz bcm5719-llvm-45d910de994098142d6e8ffae94963df0f649dc2.zip |
Don't initialize interceptor_metadata_map unless SI_POSIX is set
Differential revision: https://reviews.llvm.org/D64794
llvm-svn: 367188
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index e805c8649b9..16bdffe4c21 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -317,11 +317,11 @@ struct CommonInterceptorMetadata { }; }; +#if SI_POSIX typedef AddrHashMap<CommonInterceptorMetadata, 31051> MetadataHashMap; static MetadataHashMap *interceptor_metadata_map; -#if SI_POSIX UNUSED static void SetInterceptorMetadata(__sanitizer_FILE *addr, const FileMetadata &file) { MetadataHashMap::Handle h(interceptor_metadata_map, (uptr)addr); @@ -9551,9 +9551,11 @@ INTERCEPTOR(void, sl_free, void *sl, int freeall) { #endif static void InitializeCommonInterceptors() { +#if SI_POSIX static u64 metadata_mem[sizeof(MetadataHashMap) / sizeof(u64) + 1]; interceptor_metadata_map = new ((void *)&metadata_mem) MetadataHashMap(); // NOLINT +#endif INIT_MMAP; INIT_MMAP64; |