Home | History | Annotate | Download | only in tests
      1 //===-- asan_globals_test.cc ----------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 // This file is a part of AddressSanitizer, an address sanity checker.
     11 //
     12 // Some globals in a separate file.
     13 //===----------------------------------------------------------------------===//
     14 
     15 extern char glob5[5];
     16 static char static10[10];
     17 
     18 int GlobalsTest(int zero) {
     19   static char func_static15[15];
     20   glob5[zero] = 0;
     21   static10[zero] = 0;
     22   func_static15[zero] = 0;
     23   return glob5[1] + func_static15[2];
     24 }
     25