1 //===-- asan_globals_test.cpp ---------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file is a part of AddressSanitizer, an address sanity checker.
11 // Some globals in a separate file.
12 //===----------------------------------------------------------------------===//
13 #include "asan_test_utils.h"
33 char glob10000
[10000];
34 char glob100000
[100000];
36 static char static10
[10];
38 int GlobalsTest(int zero
) {
39 static char func_static15
[15];
42 func_static15
[zero
] = 0;
43 return glob5
[1] + func_static15
[2];