[PATCH] D64794: [sanitizer_common] Don't initialize interceptor_metadata_map unless SI_POSIX is set

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 28 01:59:32 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL367188: Don't initialize interceptor_metadata_map unless SI_POSIX is set (authored by evgeny777, committed by ).
Herald added a subscriber: delcypher.
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D64794?vs=210075&id=212087#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64794/new/

https://reviews.llvm.org/D64794

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -317,11 +317,11 @@
   };
 };
 
+#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 @@
 #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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64794.212087.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190728/56908329/attachment.bin>


More information about the llvm-commits mailing list