summaryrefslogtreecommitdiff
path: root/lib/asan/lit_tests/interface_symbols.c
blob: 03998d5c2cd15b0034c1ac65f3853f895b79f73f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Check the presense of interface symbols in compiled file.

// RUN: %clang -faddress-sanitizer -dead_strip -O2 %s -o %t.exe
// RUN: nm %t.exe | egrep " [TW] " | sed "s/.* T //" | sed "s/.* W //" \
// RUN:    | grep "__asan_" | sed "s/___asan_/__asan_/" > %t.symbols
// RUN: cat %p/../../../include/sanitizer/asan_interface.h \
// RUN:    | sed "s/\/\/.*//" | sed "s/typedef.*//" \
// RUN:    | grep "__asan_.*(" | sed "s/.* __asan_/__asan_/;s/(.*//" \
// RUN:    > %t.interface
// RUN: echo __asan_report_load1 >> %t.interface
// RUN: echo __asan_report_load2 >> %t.interface
// RUN: echo __asan_report_load4 >> %t.interface
// RUN: echo __asan_report_load8 >> %t.interface
// RUN: echo __asan_report_load16 >> %t.interface
// RUN: echo __asan_report_store1 >> %t.interface
// RUN: echo __asan_report_store2 >> %t.interface
// RUN: echo __asan_report_store4 >> %t.interface
// RUN: echo __asan_report_store8 >> %t.interface
// RUN: echo __asan_report_store16 >> %t.interface
// RUN: cat %t.interface | sort -u | diff %t.symbols -

int main() { return 0; }