[PATCH] D61871: [asan] Fix debug asan build link error
Walter Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 14:14:08 PDT 2019
waltl added a comment.
Here are the changes I needed to make to get this to compile for linux and Myriad.
================
Comment at: compiler-rt/lib/asan/asan_malloc_local.h:25
- __asan::asan_init_is_running);
-}
-
----------------
We still need to keep this function -- it's used in asan_malloc_linux.cc.
================
Comment at: compiler-rt/lib/asan/asan_malloc_local.h:28
+// implementation.
+#define MAYBE_ALLOCATE_FROM_LOCAL_POOL \
+ do { \
----------------
rnk wrote:
> vitalybuka wrote:
> > can we make it always inline function?
> We'd still need a macro with control flow because it returns early if the local pool is used.
#define MAYBE_ALLOCATE_FROM_LOCAL_POOL(nothrow) \
================
Comment at: compiler-rt/lib/asan/asan_malloc_local.h:36
+ } \
+ while (0)
----------------
} while (0)
================
Comment at: compiler-rt/lib/asan/asan_malloc_local.h:42
-#define ALLOCATE_FROM_LOCAL_POOL 0
+#define MAYBE_ALLOCATE_FROM_LOCAL_POOL
#define IS_FROM_LOCAL_POOL(ptr) 0
----------------
#define MAYBE_ALLOCATE_FROM_LOCAL_POOL(nothrow)
================
Comment at: compiler-rt/lib/asan/asan_new_delete.cc:75
+#define OPERATOR_NEW_BODY(type, nothrow) \
+ MAYBE_ALLOCATE_FROM_LOCAL_POOL; \
+ GET_STACK_TRACE_MALLOC; \
----------------
MAYBE_ALLOCATE_FROM_LOCAL_POOL(nothrow); \
================
Comment at: compiler-rt/lib/asan/asan_new_delete.cc:82
+#define OPERATOR_NEW_BODY_ALIGN(type, nothrow) \
+ MAYBE_ALLOCATE_FROM_LOCAL_POOL; \
+ GET_STACK_TRACE_MALLOC; \
----------------
MAYBE_ALLOCATE_FROM_LOCAL_POOL(nothrow); \
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61871/new/
https://reviews.llvm.org/D61871
More information about the llvm-commits
mailing list