1 //===-- asan_interceptors.h -------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of AddressSanitizer, an address sanity checker.
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
)
27 DECLARE_REAL(int, sigaction
, int signum
, const struct sigaction
*act
,
28 struct sigaction
*oldact
)
32 void InitializeAsanInterceptors();
36 #endif // ASAN_INTERCEPTORS_H