-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[asan] Do not instrument accesses to profiling globals
It's only useful to asan-itize profiling globals while debugging llvm's profiling instrumentation passes. Enabling asan along with instrprof or gcov instrumentation shouldn't incur extra overhead. This patch is in the same spirit as r264805 and r273202, which disabled tsan instrumentation of instrprof/gcov globals. Differential Revision: http://reviews.llvm.org/D21541 llvm-svn: 273444
- Loading branch information
Showing
2 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-profiling-globals.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; This test checks that we don't instrument globals created by profiling passes. | ||
; RUN: opt < %s -asan -asan-module -S | FileCheck %s | ||
|
||
@__profc_test = private global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8 | ||
@__llvm_gcov_ctr = internal global [1 x i64] zeroinitializer | ||
|
||
; CHECK-DAG: @asan.module_ctor | ||
; CHECK-NOT: @__asan_gen{{.*}}__llvm_gcov_ctr | ||
; CHECK-NOT: @__asan_gen{{.*}}__profc_test |