Alexey Samsonov | d66b12b | 2012-12-26 14:44:46 +0000 | [diff] [blame^] | 1 | // 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 | |
| 8 | namespace XXX { |
| 9 | struct 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 | |
| 21 | int main(int argc, char **argv) { |
| 22 | int res = XXX::YYY::ZZZ(argc + 10); |
| 23 | return res; |
| 24 | } |