From f29212fa7efd283d9e595a5e874790a7879445be Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Thu, 17 Nov 2016 16:55:40 +0000 Subject: [PATCH] [asan] Turn on Mach-O global metadata liveness tracking by default 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 Differential Revision: https://reviews.llvm.org/D26772 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287235 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 +- test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index eb942780481..ac1eebda259 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -268,7 +268,7 @@ static cl::opt 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 ClDebug("asan-debug", cl::desc("debug"), cl::Hidden, diff --git a/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll b/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll index 25b76405a1c..82168175361 100644 --- a/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll +++ b/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" -- 2.40.0