• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 {
ZZZXXX::YYY10   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 }  // namespace XXX
20 
main(int argc,char ** argv)21 int main(int argc, char **argv) {
22   int res = XXX::YYY::ZZZ(argc + 10);
23   return res;
24 }
25