[PATCH] D54581: [compiler-rt] Windows Debug build fix

Matthew G McGovern via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 07:54:01 PST 2018


mcgov created this revision.
mcgov added reviewers: rnk, vitalybuka.
Herald added subscribers: Sanitizers, llvm-commits, dberris, kubamracek.

Conditionally define symbol for MemalignFromLocalPool(a,b) to nullptr for windows debug builds. This function is never called on Windows release builds because the 'if' condition that contains it is optimized away. It's presence breaks debug builds for asan_new_delete.cc, so defining it to nullptr provides a syntactically correct substitution.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D54581

Files:
  lib/asan/asan_new_delete.cc


Index: lib/asan/asan_new_delete.cc
===================================================================
--- lib/asan/asan_new_delete.cc
+++ lib/asan/asan_new_delete.cc
@@ -69,6 +69,11 @@
 enum class align_val_t: size_t {};
 }  // namespace std

+//quick fix for debug windows builds.
+#ifdef SANITIZER_WINDOWS && DEBUG
+ #define MemalignFromLocalPool(x,y) nullptr
+#endif
+
 // TODO(alekseyshl): throw std::bad_alloc instead of dying on OOM.
 // For local pool allocation, align to SHADOW_GRANULARITY to match asan
 // allocator behavior.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54581.174128.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181115/40ae164f/attachment.bin>


More information about the llvm-commits mailing list