2012-06-04 21:50:10 +08:00
|
|
|
//===-- asan_globals_test.cc ----------------------===//
|
2011-11-30 09:07:02 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file is a part of AddressSanitizer, an address sanity checker.
|
|
|
|
//
|
|
|
|
// Some globals in a separate file.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
extern char glob5[5];
|
|
|
|
static char static10[10];
|
|
|
|
|
|
|
|
int GlobalsTest(int zero) {
|
|
|
|
static char func_static15[15];
|
|
|
|
glob5[zero] = 0;
|
|
|
|
static10[zero] = 0;
|
|
|
|
func_static15[zero] = 0;
|
|
|
|
return glob5[1] + func_static15[2];
|
|
|
|
}
|