blob: 7f4d59fc58387c650e4ce5a2d7bc6ef5198e0153 [file] [log] [blame]
Alexey Samsonovd66b12b2012-12-26 14:44:46 +00001// Check that ASan is able to print demangled frame name even w/o
2// symbolization.
3
4// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
5
6#include <string.h>
7
8namespace XXX {
9struct YYY {
10 static int ZZZ(int x) {
11 char array[10];
12 memset(array, 0, 10);
13 return array[x]; // BOOOM
14 // CHECK: {{ERROR: AddressSanitizer: stack-buffer-overflow}}
15 // CHECK: {{READ of size 1 at 0x.* thread T0}}
16 // CHECK: {{Address 0x.* is .* frame <XXX::YYY::ZZZ(.*)>}}
17 }
18};
19};
20
21int main(int argc, char **argv) {
22 int res = XXX::YYY::ZZZ(argc + 10);
23 return res;
24}