[PATCH] D14725: [compiler-rt] [dfsan] Unify aarch64 mapping
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 20:10:45 PST 2015
pcc added inline comments.
================
Comment at: lib/dfsan/dfsan.cc:371
@@ +370,3 @@
+static void InitializePlatformEarly() {
+#ifdef DFSAN_RUNTIME_VMA
+# ifdef __aarch64__
----------------
You don't need this `#ifdef` (or the macro), as it is redundant with `__aarch64__`.
================
Comment at: lib/dfsan/dfsan.cc:378
@@ +377,3 @@
+ } else {
+ Printf("FATAL: ThreadSanitizer: unsupported VMA range\n");
+ Printf("FATAL: Found %d - Supported 39 and 42\n", __dfsan::vmaSize);
----------------
ThreadSanitizer -> DataFlowSanitizer
================
Comment at: lib/dfsan/dfsan_platform.h:92
@@ +91,3 @@
+uptr UnionTableAddr() {
+ return MappingArchImpl<MAPPING_UNION_TABLE_ADDR>();
+}
----------------
I would prefer if these functions were written more directly.
e.g.
```uptr UnionTableAddr() {
#if defined(__x86_64__)
return 0x200000000000;
#elif ...
#elif defined(__aarch64__)
if (vmaSize == 39)
return ...;
else
return ...;
#endif
}```
http://reviews.llvm.org/D14725
More information about the llvm-commits
mailing list