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

Matthew G McGovern via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 10:41:07 PST 2018


mcgov updated this revision to Diff 174646.
mcgov edited the summary of this revision.
mcgov added a comment.

Replaced #define with a function that asserts if called.


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,15 @@
 enum class align_val_t: size_t {};
 }  // namespace std

+//quick fix for debug windows builds.
+#if SANITIZER_WINDOWS
+void* MemalignFromLocalPool(uptr alignment, uptr size){
+    CHECK("ALLOCATE_FROM_LOCAL_POOL is 0, MemAlignFromLocalPool"
+          " should never be called on this platform.");
+    return 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.174646.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181119/8e733700/attachment.bin>


More information about the llvm-commits mailing list