]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | //===----------- shared-lib-test-so.cc --------------------------*- C++ -*-===// |
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 | //===----------------------------------------------------------------------===// | |
13 | #include <stdio.h> | |
14 | #include <string.h> | |
15 | ||
16 | int pad[10]; | |
17 | int GLOB[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
18 | ||
19 | extern "C" | |
20 | void inc(int index) { | |
21 | GLOB[index]++; | |
22 | } | |
23 | ||
24 | extern "C" | |
25 | void inc2(int *a, int index) { | |
26 | a[index]++; | |
27 | } |