OLD | NEW |
1 //===- subzero/runtime/szrt_asan.c - AddressSanitizer Runtime -----*- C -*-===// | 1 //===- subzero/runtime/szrt_asan.c - AddressSanitizer Runtime -----*- C -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
11 /// \brief Provides the AddressSanitizer runtime. | 11 /// \brief Provides the AddressSanitizer runtime. |
12 /// | 12 /// |
13 /// Exposes functions for initializing the shadow memory region and managing it | 13 /// Exposes functions for initializing the shadow memory region and managing it |
14 /// on loads, stores, and allocations. | 14 /// on loads, stores, and allocations. |
15 /// | 15 /// |
16 //===----------------------------------------------------------------------===// | 16 //===----------------------------------------------------------------------===// |
17 | 17 |
18 #include <stdio.h> | 18 #include <stdio.h> |
19 | 19 |
20 // TODO(tlively): Define and implement this library | 20 // TODO(tlively): Define and implement this library |
21 void __asan_init(void) { | 21 void __asan_init(void) { |
22 printf("Set up shadow memory here\n"); | 22 printf("Set up shadow memory here\n"); |
23 return; | 23 return; |
24 } | 24 } |
| 25 |
| 26 void __asan_check(void *addr, int size) { |
| 27 printf("Check access of %p of size %d\n", addr, size); |
| 28 return; |
| 29 } |
OLD | NEW |