53 {
"alloc", SaberCheckerAPI::CK_ALLOC},
54 {
"alloc_check", SaberCheckerAPI::CK_ALLOC},
55 {
"alloc_clear", SaberCheckerAPI::CK_ALLOC},
56 {
"calloc", SaberCheckerAPI::CK_ALLOC},
57 {
"jpeg_alloc_huff_table", SaberCheckerAPI::CK_ALLOC},
58 {
"jpeg_alloc_quant_table", SaberCheckerAPI::CK_ALLOC},
59 {
"lalloc", SaberCheckerAPI::CK_ALLOC},
60 {
"lalloc_clear", SaberCheckerAPI::CK_ALLOC},
61 {
"malloc", SaberCheckerAPI::CK_ALLOC},
62 {
"nhalloc", SaberCheckerAPI::CK_ALLOC},
63 {
"oballoc", SaberCheckerAPI::CK_ALLOC},
64 {
"permalloc", SaberCheckerAPI::CK_ALLOC},
65 {
"png_create_info_struct", SaberCheckerAPI::CK_ALLOC},
66 {
"png_create_write_struct", SaberCheckerAPI::CK_ALLOC},
67 {
"safe_calloc", SaberCheckerAPI::CK_ALLOC},
68 {
"safe_malloc", SaberCheckerAPI::CK_ALLOC},
69 {
"safecalloc", SaberCheckerAPI::CK_ALLOC},
70 {
"safemalloc", SaberCheckerAPI::CK_ALLOC},
71 {
"safexcalloc", SaberCheckerAPI::CK_ALLOC},
72 {
"safexmalloc", SaberCheckerAPI::CK_ALLOC},
73 {
"savealloc", SaberCheckerAPI::CK_ALLOC},
74 {
"xalloc", SaberCheckerAPI::CK_ALLOC},
75 {
"xcalloc", SaberCheckerAPI::CK_ALLOC},
76 {
"xmalloc", SaberCheckerAPI::CK_ALLOC},
77 {
"SSL_CTX_new", SaberCheckerAPI::CK_ALLOC},
78 {
"SSL_new", SaberCheckerAPI::CK_ALLOC},
79 {
"VOS_MemAlloc", SaberCheckerAPI::CK_ALLOC},
81 {
"VOS_MemFree", SaberCheckerAPI::CK_FREE},
82 {
"cfree", SaberCheckerAPI::CK_FREE},
83 {
"free", SaberCheckerAPI::CK_FREE},
84 {
"free_all_mem", SaberCheckerAPI::CK_FREE},
85 {
"freeaddrinfo", SaberCheckerAPI::CK_FREE},
86 {
"gcry_mpi_release", SaberCheckerAPI::CK_FREE},
87 {
"gcry_sexp_release", SaberCheckerAPI::CK_FREE},
88 {
"globfree", SaberCheckerAPI::CK_FREE},
89 {
"nhfree", SaberCheckerAPI::CK_FREE},
90 {
"obstack_free", SaberCheckerAPI::CK_FREE},
91 {
"safe_cfree", SaberCheckerAPI::CK_FREE},
92 {
"safe_free", SaberCheckerAPI::CK_FREE},
93 {
"safefree", SaberCheckerAPI::CK_FREE},
94 {
"safexfree", SaberCheckerAPI::CK_FREE},
95 {
"sm_free", SaberCheckerAPI::CK_FREE},
96 {
"vim_free", SaberCheckerAPI::CK_FREE},
97 {
"xfree", SaberCheckerAPI::CK_FREE},
98 {
"SSL_CTX_free", SaberCheckerAPI::CK_FREE},
99 {
"SSL_free", SaberCheckerAPI::CK_FREE},
100 {
"XFree", SaberCheckerAPI::CK_FREE},
102 {
"fopen", SaberCheckerAPI::CK_FOPEN},
103 {
"\01_fopen", SaberCheckerAPI::CK_FOPEN},
104 {
"\01fopen64", SaberCheckerAPI::CK_FOPEN},
105 {
"\01readdir64", SaberCheckerAPI::CK_FOPEN},
106 {
"\01tmpfile64", SaberCheckerAPI::CK_FOPEN},
107 {
"fopen64", SaberCheckerAPI::CK_FOPEN},
108 {
"XOpenDisplay", SaberCheckerAPI::CK_FOPEN},
109 {
"XtOpenDisplay", SaberCheckerAPI::CK_FOPEN},
110 {
"fopencookie", SaberCheckerAPI::CK_FOPEN},
111 {
"popen", SaberCheckerAPI::CK_FOPEN},
112 {
"readdir", SaberCheckerAPI::CK_FOPEN},
113 {
"readdir64", SaberCheckerAPI::CK_FOPEN},
114 {
"gzdopen", SaberCheckerAPI::CK_FOPEN},
115 {
"iconv_open", SaberCheckerAPI::CK_FOPEN},
116 {
"tmpfile", SaberCheckerAPI::CK_FOPEN},
117 {
"tmpfile64", SaberCheckerAPI::CK_FOPEN},
118 {
"BIO_new_socket", SaberCheckerAPI::CK_FOPEN},
119 {
"gcry_md_open", SaberCheckerAPI::CK_FOPEN},
120 {
"gcry_cipher_open", SaberCheckerAPI::CK_FOPEN},
123 {
"fclose", SaberCheckerAPI::CK_FCLOSE},
124 {
"XCloseDisplay", SaberCheckerAPI::CK_FCLOSE},
125 {
"XtCloseDisplay", SaberCheckerAPI::CK_FCLOSE},
126 {
"__res_nclose", SaberCheckerAPI::CK_FCLOSE},
127 {
"pclose", SaberCheckerAPI::CK_FCLOSE},
128 {
"closedir", SaberCheckerAPI::CK_FCLOSE},
129 {
"dlclose", SaberCheckerAPI::CK_FCLOSE},
130 {
"gzclose", SaberCheckerAPI::CK_FCLOSE},
131 {
"iconv_close", SaberCheckerAPI::CK_FCLOSE},
132 {
"gcry_md_close", SaberCheckerAPI::CK_FCLOSE},
133 {
"gcry_cipher_close", SaberCheckerAPI::CK_FCLOSE},
136 {0, SaberCheckerAPI::CK_DUMMY}
144 void SaberCheckerAPI::init()
146 set<CHECKER_TYPE> t_seen;
148 t_seen.insert(CK_DUMMY);
155 if(t_seen.count(
p->t))
159 assert(!
"ei_pairs not grouped by type");
164 if(tdAPIMap.count(
p->n))
168 assert(!
"duplicate name in ei_pairs");
170 tdAPIMap[
p->n]=
p->t;
static const ei_pair ei_pairs[]