Coverage for /Syzygy/agent/asan/asan_rtl_impl.h

CoverageLines executed / instrumented / missingexe / inst / missLanguageGroup
0.0%0086.C++source

Line-by-line coverage:

   1    :  // Copyright 2012 Google Inc. All Rights Reserved.
   2    :  //
   3    :  // Licensed under the Apache License, Version 2.0 (the "License");
   4    :  // you may not use this file except in compliance with the License.
   5    :  // You may obtain a copy of the License at
   6    :  //
   7    :  //     http://www.apache.org/licenses/LICENSE-2.0
   8    :  //
   9    :  // Unless required by applicable law or agreed to in writing, software
  10    :  // distributed under the License is distributed on an "AS IS" BASIS,
  11    :  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12    :  // See the License for the specific language governing permissions and
  13    :  // limitations under the License.
  14    :  //
  15    :  // Implement the ASAN RTL functions.
  16    :  #ifndef SYZYGY_AGENT_ASAN_ASAN_RTL_IMPL_H_
  17    :  #define SYZYGY_AGENT_ASAN_ASAN_RTL_IMPL_H_
  18    :  
  19    :  #include <windows.h>
  20    :  
  21  m :  namespace agent {
  22  m :  namespace asan {
  23    :  
  24  m :  class AsanRuntime;
  25  m :  struct AsanErrorInfo;
  26    :  
  27    :  // Initialize the Asan runtime library global variables.
  28    :  // @param runtime The Asan runtime manager.
  29  m :  void SetUpRtl(AsanRuntime* runtime);
  30    :  
  31    :  // Tear down the runtime library.
  32  m :  void TearDownRtl();
  33    :  
  34  m :  }  // namespace asan
  35  m :  }  // namespace agent
  36    :  
  37    :  // Exposes the Asan Rtl functions.
  38  m :  extern "C" {
  39    :  
  40  m :  HANDLE WINAPI asan_HeapCreate(DWORD options,
  41  m :                                SIZE_T initial_size,
  42  m :                                SIZE_T maximum_size);
  43    :  
  44  m :  BOOL WINAPI asan_HeapDestroy(HANDLE heap);
  45    :  
  46  m :  LPVOID WINAPI asan_HeapAlloc(HANDLE heap,
  47  m :                               DWORD flags,
  48  m :                               SIZE_T bytes);
  49    :  
  50  m :  LPVOID WINAPI asan_HeapReAlloc(HANDLE heap,
  51  m :                                 DWORD flags,
  52  m :                                 LPVOID mem,
  53  m :                                 SIZE_T bytes);
  54    :  
  55  m :  BOOL WINAPI asan_HeapFree(HANDLE heap,
  56  m :                            DWORD flags,
  57  m :                            LPVOID mem);
  58    :  
  59  m :  SIZE_T WINAPI asan_HeapSize(HANDLE heap,
  60  m :                              DWORD flags,
  61  m :                              LPCVOID mem);
  62    :  
  63  m :  BOOL WINAPI asan_HeapValidate(HANDLE heap,
  64  m :                                DWORD flags,
  65  m :                                LPCVOID mem);
  66    :  
  67  m :  SIZE_T WINAPI asan_HeapCompact(HANDLE heap,
  68  m :                                 DWORD flags);
  69    :  
  70  m :  BOOL WINAPI asan_HeapLock(HANDLE heap);
  71    :  
  72  m :  BOOL WINAPI asan_HeapUnlock(HANDLE heap);
  73    :  
  74  m :  BOOL WINAPI asan_HeapWalk(HANDLE heap,
  75  m :                            LPPROCESS_HEAP_ENTRY entry);
  76    :  
  77  m :  BOOL WINAPI asan_HeapSetInformation(
  78  m :      HANDLE heap, HEAP_INFORMATION_CLASS info_class,
  79  m :      PVOID info, SIZE_T info_length);
  80    :  
  81  m :  BOOL WINAPI asan_HeapQueryInformation(
  82  m :      HANDLE heap, HEAP_INFORMATION_CLASS info_class,
  83  m :      PVOID info, SIZE_T info_length, PSIZE_T return_length);
  84    :  
  85  m :  typedef void (*AsanErrorCallBack)(agent::asan::AsanErrorInfo*);
  86  m :  void WINAPI asan_SetCallBack(AsanErrorCallBack callback);
  87    :  
  88  m :  void* __cdecl asan_memcpy(unsigned char* destination,
  89  m :                            const unsigned char* source,
  90  m :                            size_t num);
  91    :  
  92  m :  void* __cdecl asan_memmove(unsigned char* destination,
  93  m :                             const unsigned char* source,
  94  m :                             size_t num);
  95    :  
  96  m :  void* __cdecl asan_memset(unsigned char* ptr,
  97  m :                            int value,
  98  m :                            size_t num);
  99    :  
 100  m :  const void* __cdecl asan_memchr(const unsigned char* ptr,
 101  m :                                  int value, size_t num);
 102    :  
 103  m :  size_t __cdecl asan_strcspn(const char* str1,
 104  m :                              const char* str2);
 105    :  
 106  m :  size_t __cdecl asan_strlen(const char* str);
 107    :  
 108  m :  const char* __cdecl asan_strrchr(const char* str,
 109  m :                                   int character);
 110    :  
 111  m :  int __cdecl asan_strcmp(const char* str1,
 112  m :                          const char* str2);
 113    :  
 114  m :  const char* __cdecl asan_strpbrk(const char* str1,
 115  m :                                   const char* str2);
 116    :  
 117  m :  const char* __cdecl asan_strstr(const char* str1,
 118  m :                                  const char* str2);
 119    :  
 120  m :  size_t __cdecl asan_strspn(const char* str1,
 121  m :                             const char* str2);
 122    :  
 123  m :  char* __cdecl asan_strncpy(char* destination,
 124  m :                             const char* source,
 125  m :                             size_t num);
 126    :  
 127  m :  char* __cdecl asan_strncat(char* destination,
 128  m :                             const char* source,
 129  m :                             size_t num);
 130    :  
 131    :  // Allows specifying a callback that will be called by the function interceptors
 132    :  // once the internal call to the intercepted function returns. This is for
 133    :  // testing purposes only.
 134  m :  typedef void (*InterceptorTailCallback)(void);
 135  m :  void asan_SetInterceptorTailCallback(InterceptorTailCallback callback);
 136    :  
 137  m :  BOOL WINAPI asan_ReadFile(HANDLE file_handle,
 138  m :                            LPVOID buffer,
 139  m :                            DWORD bytes_to_read,
 140  m :                            LPDWORD bytes_read,
 141  m :                            LPOVERLAPPED overlapped);
 142    :  
 143  m :  BOOL WINAPI asan_WriteFile(HANDLE file_handle,
 144  m :                             LPCVOID buffer,
 145  m :                             DWORD bytes_to_write,
 146  m :                             LPDWORD bytes_written,
 147  m :                             LPOVERLAPPED overlapped);
 148    :  
 149  m :  }  // extern "C"
 150    :  
 151    :  #endif  // SYZYGY_AGENT_ASAN_ASAN_RTL_IMPL_H_

Coverage information generated Wed Dec 11 11:34:16 2013.