extended checkmemoryleak white list
This commit is contained in:
parent
38cf9f26df
commit
7e31c91a79
|
@ -42,7 +42,9 @@ CheckMemoryLeakNoVar instance4;
|
|||
}
|
||||
|
||||
|
||||
// This list needs to be alphabetically sorted so we can run bsearch on it
|
||||
// This list needs to be alphabetically sorted so we can run bsearch on it.
|
||||
// This list contains function names whith const parameters e.g.: atof(const char *)
|
||||
// Reference: http://www.aquaphoenix.com/ref/gnu_c_library/libc_492.html#SEC492
|
||||
static const char * const call_func_white_list[] =
|
||||
{
|
||||
"_open", "_wopen", "access", "asctime", "asctime_r", "asprintf", "assert"
|
||||
|
@ -56,12 +58,14 @@ static const char * const call_func_white_list[] =
|
|||
, "lockf", "lseek", "lstat", "memchr", "memcmp", "memcpy", "memmove", "memset", "open"
|
||||
, "perror", "posix_fadvise", "posix_fallocate", "pread"
|
||||
, "printf", "puts", "pwrite", "qsort", "read", "readahead", "readdir", "readdir_r", "readv"
|
||||
, "realloc", "return", "rewind", "rewinddir", "scandir", "scanf", "seekdir"
|
||||
, "setbuf", "setbuffer", "setlinebuf", "setvbuf", "snprintf", "sprintf", "sscanf", "stat", "strcasecmp"
|
||||
, "strcat", "strchr", "strcmp", "strcpy", "stricmp", "strlen", "strncat", "strncmp"
|
||||
, "strncpy", "strrchr", "strstr", "strtod", "strtol", "strtoul", "switch"
|
||||
, "sync_file_range", "telldir", "time", "typeid", "vfprintf", "vprintf"
|
||||
, "vsnprintf", "vsprintf", "while", "write", "writev"
|
||||
, "realloc", "remove", "rename", "return", "rewind", "rewinddir", "rindex" ,"rmdir" ,"scandir", "scanf", "seekdir"
|
||||
, "setbuf", "setbuffer", "sethostname", "setlinebuf", "setlocale" ,"setvbuf", "snprintf", "sprintf", "sscanf"
|
||||
, "stat", "stpcpy", "strcasecmp", "strcat", "strchr", "strcmp", "strcoll"
|
||||
, "strcpy", "strcspn", "strdup", "stricmp", "strlen", "strncasecmp", "strncat", "strncmp"
|
||||
, "strncpy", "strpbrk","strrchr", "strspn", "strstr", "strtod", "strtol", "strtoul", "switch"
|
||||
, "symlink", "sync_file_range", "system", "telldir", "tempnam","time", "typeid", "unlink"
|
||||
, "utime", "utimes" ,"vasprintf", "vfprintf", "vfscanf", "vprintf"
|
||||
, "vscanf", "vsnprintf", "vsprintf", "vsscanf", "while", "write", "writev"
|
||||
};
|
||||
|
||||
static int call_func_white_list_compare(const void *a, const void *b)
|
||||
|
|
|
@ -575,11 +575,13 @@ private:
|
|||
, "memmove", "memset", "perror", "posix_fadvise", "posix_fallocate", "pread"
|
||||
, "printf", "puts", "pwrite", "read", "readahead", "readdir", "readdir_r", "readv"
|
||||
, "realloc", "return", "rewind", "rewinddir", "scandir", "seekdir"
|
||||
, "setbuf", "setbuffer", "setlinebuf", "setvbuf", "snprintf", "sprintf", "strcasecmp"
|
||||
, "setbuf", "setbuffer", "setlinebuf", "setvbuf", "snprintf", "sprintf", "stpcpy", "strcasecmp"
|
||||
, "strcat", "strchr", "strcmp", "strcpy", "stricmp", "strlen", "strncat", "strncmp"
|
||||
, "strncpy", "strrchr", "strstr", "strtod", "strtol", "strtoul", "switch"
|
||||
, "strncpy", "strrchr", "strspn" ,"strstr", "strtod", "strtol", "strtoul", "switch"
|
||||
, "sync_file_range", "telldir", "typeid", "while", "write", "writev", "lstat", "stat"
|
||||
, "_open", "_wopen"
|
||||
, "_open", "_wopen", "vscanf", "vsscanf", "vfscanf", "vasprintf", "utime", "utimes", "unlink"
|
||||
, "tempnam", "system", "symlink", "strpbrk", "strncasecmp", "strdup", "strcspn", "strcoll"
|
||||
, "setlocale", "sethostname", "rmdir", "rindex", "rename", "remove"
|
||||
};
|
||||
|
||||
for (unsigned int i = 0; i < (sizeof(call_func_white_list) / sizeof(char *)); ++i)
|
||||
|
|
Loading…
Reference in New Issue