diff options
| author | Kuba Mracek <mracek@apple.com> | 2017-01-11 22:26:10 +0000 |
|---|---|---|
| committer | Kuba Mracek <mracek@apple.com> | 2017-01-11 22:26:10 +0000 |
| commit | 503162b4a1fc5d5274c08d5f8e317c2b8cb46ca0 (patch) | |
| tree | 8bd002436bd42b854da979bdc9aba6e087404ed3 /llvm/test | |
| parent | c83efa85e2146870e8876c37cd555128d8ee2650 (diff) | |
| download | bcm5719-llvm-503162b4a1fc5d5274c08d5f8e317c2b8cb46ca0.tar.gz bcm5719-llvm-503162b4a1fc5d5274c08d5f8e317c2b8cb46ca0.zip | |
[asan] Set alignment of __asan_global_* globals to sizeof(GlobalStruct)
When using profiling and ASan together (-fprofile-instr-generate -fcoverage-mapping -fsanitize=address), at least on Darwin, the section of globals that ASan emits (__asan_globals) is misaligned and starts at an odd offset. This really doesn't have anything to do with profiling, but it triggers the issue because profiling emits a string section, which can have arbitrary size. This patch changes the alignment to sizeof(GlobalStruct).
Differential Revision: https://reviews.llvm.org/D28573
llvm-svn: 291715
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll index af4da14d786..5d510014a12 100644 --- a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll +++ b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll @@ -16,7 +16,7 @@ target triple = "x86_64-apple-macosx10.11.0" ; Find the metadata for @global: -; CHECK: [[METADATA:@.+]] = internal global {{.*}} @global {{.*}} section "__DATA,__asan_globals,regular", align 1 +; CHECK: [[METADATA:@.+]] = internal global {{.*}} @global {{.*}} section "__DATA,__asan_globals,regular", align 64 ; Find the liveness binder for @global and its metadata: ; CHECK: @__asan_binder_global = internal global {{.*}} @global {{.*}} [[METADATA]] {{.*}} section "__DATA,__asan_liveness,regular,live_support" |

