Kostya Serebryany | 1e172b4 | 2011-11-30 01:07:02 +0000 | [diff] [blame] | 1 | //===-- asan_interceptors.h -------------------------------------*- 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 | // ASan-private header for asan_interceptors.cc |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | #ifndef ASAN_INTERCEPTORS_H |
| 15 | #define ASAN_INTERCEPTORS_H |
| 16 | |
| 17 | #include "asan_internal.h" |
Alexey Samsonov | 5b29018 | 2012-02-08 19:52:01 +0000 | [diff] [blame] | 18 | #include "interception/interception.h" |
Alexey Samsonov | f2598fc | 2012-02-02 10:39:40 +0000 | [diff] [blame] | 19 | |
Chandler Carruth | 6bae39d | 2012-06-25 06:53:10 +0000 | [diff] [blame] | 20 | DECLARE_REAL(int, memcmp, const void *a1, const void *a2, uptr size) |
| 21 | DECLARE_REAL(void*, memcpy, void *to, const void *from, uptr size) |
| 22 | DECLARE_REAL(void*, memset, void *block, int c, uptr size) |
| 23 | DECLARE_REAL(char*, strchr, const char *str, int c) |
| 24 | DECLARE_REAL(uptr, strlen, const char *s) |
| 25 | DECLARE_REAL(char*, strncpy, char *to, const char *from, uptr size) |
| 26 | DECLARE_REAL(uptr, strnlen, const char *s, uptr maxlen) |
Alexander Potapenko | eb8c46e | 2012-08-24 09:22:05 +0000 | [diff] [blame] | 27 | DECLARE_REAL(char*, strstr, const char *s1, const char *s2) |
Alexey Samsonov | da13ba8 | 2012-02-16 17:00:45 +0000 | [diff] [blame] | 28 | struct sigaction; |
| 29 | DECLARE_REAL(int, sigaction, int signum, const struct sigaction *act, |
Chandler Carruth | 6bae39d | 2012-06-25 06:53:10 +0000 | [diff] [blame] | 30 | struct sigaction *oldact) |
Alexey Samsonov | 3389b8e | 2012-01-30 13:42:44 +0000 | [diff] [blame] | 31 | |
Kostya Serebryany | 1e172b4 | 2011-11-30 01:07:02 +0000 | [diff] [blame] | 32 | namespace __asan { |
| 33 | |
Kostya Serebryany | 1e172b4 | 2011-11-30 01:07:02 +0000 | [diff] [blame] | 34 | void InitializeAsanInterceptors(); |
Alexey Samsonov | 5cf832d | 2012-03-21 12:29:54 +0000 | [diff] [blame] | 35 | |
Kostya Serebryany | 1e172b4 | 2011-11-30 01:07:02 +0000 | [diff] [blame] | 36 | } // namespace __asan |
| 37 | |
| 38 | #endif // ASAN_INTERCEPTORS_H |