2012-10-29 Wei Mi <wmi@google.com>
[official-gcc.git] / libasan / asan_interceptors.h
bloba6ab0309bffe85ab1e56a034781cf30a7707482d
1 //===-- asan_interceptors.h -------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of AddressSanitizer, an address sanity checker.
9 //
10 // ASan-private header for asan_interceptors.cc
11 //===----------------------------------------------------------------------===//
12 #ifndef ASAN_INTERCEPTORS_H
13 #define ASAN_INTERCEPTORS_H
15 #include "asan_internal.h"
16 #include "interception/interception.h"
18 DECLARE_REAL(int, memcmp, const void *a1, const void *a2, uptr size)
19 DECLARE_REAL(void*, memcpy, void *to, const void *from, uptr size)
20 DECLARE_REAL(void*, memset, void *block, int c, uptr size)
21 DECLARE_REAL(char*, strchr, const char *str, int c)
22 DECLARE_REAL(uptr, strlen, const char *s)
23 DECLARE_REAL(char*, strncpy, char *to, const char *from, uptr size)
24 DECLARE_REAL(uptr, strnlen, const char *s, uptr maxlen)
25 DECLARE_REAL(char*, strstr, const char *s1, const char *s2)
26 struct sigaction;
27 DECLARE_REAL(int, sigaction, int signum, const struct sigaction *act,
28 struct sigaction *oldact)
30 namespace __asan {
32 void InitializeAsanInterceptors();
33 #if defined(__APPLE__)
34 void InitializeMacInterceptors();
35 #endif // __APPLE__
37 } // namespace __asan
39 #endif // ASAN_INTERCEPTORS_H