[PATCH] D26772: [asan] Turn on Mach-O global metadata liveness tracking by default

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 15:54:23 PST 2016


zaks.anna created this revision.
zaks.anna added reviewers: kubabrecka, rgov.
zaks.anna added a subscriber: llvm-commits.

This patch turns on the metadata liveness tracking since all known issues have been resolved. The future has been implemented in https://reviews.llvm.org/D16737 and enables support of dead code stripping option on Mach-O platforms.

As part of enabling the feature, I also plan on reverting the following patch to compiler-rt:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160704/369910.html


https://reviews.llvm.org/D26772

Files:
  lib/Transforms/Instrumentation/AddressSanitizer.cpp
  test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll


Index: test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
===================================================================
--- test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
+++ test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll
@@ -2,7 +2,7 @@
 ; allowing dead stripping to be performed, and that the appropriate runtime
 ; routines are invoked.
 
-; RUN: opt < %s -asan -asan-module -asan-globals-live-support -S | FileCheck %s
+; RUN: opt < %s -asan -asan-module -S | FileCheck %s
 
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.11.0"
Index: lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -268,7 +268,7 @@
                              cl::desc("Use linker features to support dead "
                                       "code stripping of globals "
                                       "(Mach-O only)"),
-                             cl::Hidden, cl::init(false));
+                             cl::Hidden, cl::init(true));
 
 // Debug flags.
 static cl::opt<int> ClDebug("asan-debug", cl::desc("debug"), cl::Hidden,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26772.78278.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161116/fe66df9a/attachment.bin>


More information about the llvm-commits mailing list