1 /* This file contains the definitions and documentation for the
2 Address Sanitizer and Thread Sanitizer builtins used in the GNU compiler.
3 Copyright (C
) 2012-2014 Free Software Foundation
, Inc.
5 This file is part of GCC.
7 GCC is free software
; you can redistribute it and
/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation
; either version
3, or (at your option
) any later
12 GCC is distributed in the hope that it will be useful
, but WITHOUT ANY
13 WARRANTY
; without even the implied warranty of MERCHANTABILITY or
14 FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC
; see the file COPYING3. If not see
19 <http
://www.gnu.org
/licenses
/>.
*/
21 /* Before including this file
, you should define a macro
:
23 DEF_SANITIZER_BUILTIN (ENUM
, NAME
, TYPE, ATTRS
)
25 See builtins.def for details.
26 The builtins are created by the C
-family of FEs in c
-family
/c
-common.c
,
27 for other FEs by asan.c.
*/
29 /* Address Sanitizer
*/
30 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_INIT
, "__asan_init_v3",
31 BT_FN_VOID
, ATTR_NOTHROW_LEAF_LIST
)
32 /* Do not reorder the BUILT_IN_ASAN_
{REPORT
,CHECK
}* builtins
, e.g. cfgcleanup.c
33 relies on this order.
*/
34 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD1
, "__asan_report_load1",
35 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
36 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD2
, "__asan_report_load2",
37 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
38 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD4
, "__asan_report_load4",
39 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
40 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD8
, "__asan_report_load8",
41 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
42 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD16
, "__asan_report_load16",
43 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
44 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD_N
, "__asan_report_load_n",
45 BT_FN_VOID_PTR_PTRMODE
,
46 ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
47 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE1
, "__asan_report_store1",
48 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
49 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE2
, "__asan_report_store2",
50 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
51 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE4
, "__asan_report_store4",
52 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
53 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE8
, "__asan_report_store8",
54 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
55 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE16
, "__asan_report_store16",
56 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
57 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE_N
, "__asan_report_store_n",
58 BT_FN_VOID_PTR_PTRMODE
,
59 ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
60 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD1
, "__asan_load1",
61 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
62 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD2
, "__asan_load2",
63 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
64 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD4
, "__asan_load4",
65 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
66 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD8
, "__asan_load8",
67 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
68 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD16
, "__asan_load16",
69 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
70 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOADN
, "__asan_loadN",
71 BT_FN_VOID_PTR_PTRMODE
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
72 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE1
, "__asan_store1",
73 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
74 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE2
, "__asan_store2",
75 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
76 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE4
, "__asan_store4",
77 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
78 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE8
, "__asan_store8",
79 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
80 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE16
, "__asan_store16",
81 BT_FN_VOID_PTR
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
82 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STOREN
, "__asan_storeN",
83 BT_FN_VOID_PTR_PTRMODE
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
84 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REGISTER_GLOBALS
,
85 "__asan_register_globals",
86 BT_FN_VOID_PTR_PTRMODE
, ATTR_NOTHROW_LEAF_LIST
)
87 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNREGISTER_GLOBALS
,
88 "__asan_unregister_globals",
89 BT_FN_VOID_PTR_PTRMODE
, ATTR_NOTHROW_LEAF_LIST
)
90 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_HANDLE_NO_RETURN
,
91 "__asan_handle_no_return",
92 BT_FN_VOID
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
93 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT
,
94 "__asan_before_dynamic_init",
95 BT_FN_VOID_CONST_PTR
, ATTR_NOTHROW_LEAF_LIST
)
96 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_AFTER_DYNAMIC_INIT
,
97 "__asan_after_dynamic_init",
98 BT_FN_VOID
, ATTR_NOTHROW_LEAF_LIST
)
100 /* Thread Sanitizer
*/
101 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT
, "__tsan_init",
102 BT_FN_VOID
, ATTR_NOTHROW_LEAF_LIST
)
103 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY
, "__tsan_func_entry",
104 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
105 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_EXIT
, "__tsan_func_exit",
106 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
107 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VPTR_UPDATE
, "__tsan_vptr_update",
108 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
109 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ1
, "__tsan_read1",
110 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
111 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ2
, "__tsan_read2",
112 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
113 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ4
, "__tsan_read4",
114 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
115 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ8
, "__tsan_read8",
116 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
117 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ16
, "__tsan_read16",
118 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
119 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE1
, "__tsan_write1",
120 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
121 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE2
, "__tsan_write2",
122 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
123 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE4
, "__tsan_write4",
124 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
125 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE8
, "__tsan_write8",
126 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
127 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE16
, "__tsan_write16",
128 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
130 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_LOAD
,
131 "__tsan_atomic8_load",
132 BT_FN_I1_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
133 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_LOAD
,
134 "__tsan_atomic16_load",
135 BT_FN_I2_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
136 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_LOAD
,
137 "__tsan_atomic32_load",
138 BT_FN_I4_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
139 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_LOAD
,
140 "__tsan_atomic64_load",
141 BT_FN_I8_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
142 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_LOAD
,
143 "__tsan_atomic128_load",
144 BT_FN_I16_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
146 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_STORE
,
147 "__tsan_atomic8_store",
148 BT_FN_VOID_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
149 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_STORE
,
150 "__tsan_atomic16_store",
151 BT_FN_VOID_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
152 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_STORE
,
153 "__tsan_atomic32_store",
154 BT_FN_VOID_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
155 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_STORE
,
156 "__tsan_atomic64_store",
157 BT_FN_VOID_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
158 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_STORE
,
159 "__tsan_atomic128_store",
160 BT_FN_VOID_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
162 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_EXCHANGE
,
163 "__tsan_atomic8_exchange",
164 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
165 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_EXCHANGE
,
166 "__tsan_atomic16_exchange",
167 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
168 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_EXCHANGE
,
169 "__tsan_atomic32_exchange",
170 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
171 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_EXCHANGE
,
172 "__tsan_atomic64_exchange",
173 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
174 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_EXCHANGE
,
175 "__tsan_atomic128_exchange",
176 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
178 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_ADD
,
179 "__tsan_atomic8_fetch_add",
180 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
181 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_ADD
,
182 "__tsan_atomic16_fetch_add",
183 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
184 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_ADD
,
185 "__tsan_atomic32_fetch_add",
186 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
187 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_ADD
,
188 "__tsan_atomic64_fetch_add",
189 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
190 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_ADD
,
191 "__tsan_atomic128_fetch_add",
192 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
194 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_SUB
,
195 "__tsan_atomic8_fetch_sub",
196 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
197 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_SUB
,
198 "__tsan_atomic16_fetch_sub",
199 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
200 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_SUB
,
201 "__tsan_atomic32_fetch_sub",
202 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
203 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_SUB
,
204 "__tsan_atomic64_fetch_sub",
205 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
206 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_SUB
,
207 "__tsan_atomic128_fetch_sub",
208 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
210 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_AND
,
211 "__tsan_atomic8_fetch_and",
212 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
213 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_AND
,
214 "__tsan_atomic16_fetch_and",
215 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
216 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_AND
,
217 "__tsan_atomic32_fetch_and",
218 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
219 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_AND
,
220 "__tsan_atomic64_fetch_and",
221 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
222 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_AND
,
223 "__tsan_atomic128_fetch_and",
224 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
226 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_OR
,
227 "__tsan_atomic8_fetch_or",
228 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
229 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_OR
,
230 "__tsan_atomic16_fetch_or",
231 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
232 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_OR
,
233 "__tsan_atomic32_fetch_or",
234 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
235 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_OR
,
236 "__tsan_atomic64_fetch_or",
237 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
238 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_OR
,
239 "__tsan_atomic128_fetch_or",
240 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
242 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_XOR
,
243 "__tsan_atomic8_fetch_xor",
244 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
245 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_XOR
,
246 "__tsan_atomic16_fetch_xor",
247 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
248 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_XOR
,
249 "__tsan_atomic32_fetch_xor",
250 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
251 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_XOR
,
252 "__tsan_atomic64_fetch_xor",
253 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
254 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_XOR
,
255 "__tsan_atomic128_fetch_xor",
256 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
258 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_NAND
,
259 "__tsan_atomic8_fetch_nand",
260 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
261 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_NAND
,
262 "__tsan_atomic16_fetch_nand",
263 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
264 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_NAND
,
265 "__tsan_atomic32_fetch_nand",
266 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
267 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_NAND
,
268 "__tsan_atomic64_fetch_nand",
269 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
270 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_NAND
,
271 "__tsan_atomic128_fetch_nand",
272 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
274 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_STRONG
,
275 "__tsan_atomic8_compare_exchange_strong",
276 BT_FN_BOOL_VPTR_PTR_I1_INT_INT
,
277 ATTR_NOTHROW_LEAF_LIST
)
278 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_STRONG
,
279 "__tsan_atomic16_compare_exchange_strong",
280 BT_FN_BOOL_VPTR_PTR_I2_INT_INT
,
281 ATTR_NOTHROW_LEAF_LIST
)
282 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_STRONG
,
283 "__tsan_atomic32_compare_exchange_strong",
284 BT_FN_BOOL_VPTR_PTR_I4_INT_INT
,
285 ATTR_NOTHROW_LEAF_LIST
)
286 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_STRONG
,
287 "__tsan_atomic64_compare_exchange_strong",
288 BT_FN_BOOL_VPTR_PTR_I8_INT_INT
,
289 ATTR_NOTHROW_LEAF_LIST
)
290 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_STRONG
,
291 "__tsan_atomic128_compare_exchange_strong",
292 BT_FN_BOOL_VPTR_PTR_I16_INT_INT
,
293 ATTR_NOTHROW_LEAF_LIST
)
295 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_WEAK
,
296 "__tsan_atomic8_compare_exchange_weak",
297 BT_FN_BOOL_VPTR_PTR_I1_INT_INT
,
298 ATTR_NOTHROW_LEAF_LIST
)
299 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_WEAK
,
300 "__tsan_atomic16_compare_exchange_weak",
301 BT_FN_BOOL_VPTR_PTR_I2_INT_INT
,
302 ATTR_NOTHROW_LEAF_LIST
)
303 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_WEAK
,
304 "__tsan_atomic32_compare_exchange_weak",
305 BT_FN_BOOL_VPTR_PTR_I4_INT_INT
,
306 ATTR_NOTHROW_LEAF_LIST
)
307 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_WEAK
,
308 "__tsan_atomic64_compare_exchange_weak",
309 BT_FN_BOOL_VPTR_PTR_I8_INT_INT
,
310 ATTR_NOTHROW_LEAF_LIST
)
311 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_WEAK
,
312 "__tsan_atomic128_compare_exchange_weak",
313 BT_FN_BOOL_VPTR_PTR_I16_INT_INT
,
314 ATTR_NOTHROW_LEAF_LIST
)
316 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_THREAD_FENCE
,
317 "__tsan_atomic_thread_fence",
318 BT_FN_VOID_INT
, ATTR_NOTHROW_LEAF_LIST
)
319 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_SIGNAL_FENCE
,
320 "__tsan_atomic_signal_fence",
321 BT_FN_VOID_INT
, ATTR_NOTHROW_LEAF_LIST
)
323 /* Undefined Behavior Sanitizer
*/
324 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW
,
325 "__ubsan_handle_divrem_overflow",
326 BT_FN_VOID_PTR_PTR_PTR
,
327 ATTR_COLD_NOTHROW_LEAF_LIST
)
328 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS
,
329 "__ubsan_handle_shift_out_of_bounds",
330 BT_FN_VOID_PTR_PTR_PTR
,
331 ATTR_COLD_NOTHROW_LEAF_LIST
)
332 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE
,
333 "__ubsan_handle_builtin_unreachable",
335 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
336 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MISSING_RETURN
,
337 "__ubsan_handle_missing_return",
339 ATTR_NORETURN_NOTHROW_LEAF_LIST
)
340 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE
,
341 "__ubsan_handle_vla_bound_not_positive",
343 ATTR_COLD_NOTHROW_LEAF_LIST
)
344 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH
,
345 "__ubsan_handle_type_mismatch",
347 ATTR_COLD_NOTHROW_LEAF_LIST
)
348 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW
,
349 "__ubsan_handle_add_overflow",
350 BT_FN_VOID_PTR_PTR_PTR
,
351 ATTR_COLD_NOTHROW_LEAF_LIST
)
352 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW
,
353 "__ubsan_handle_sub_overflow",
354 BT_FN_VOID_PTR_PTR_PTR
,
355 ATTR_COLD_NOTHROW_LEAF_LIST
)
356 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW
,
357 "__ubsan_handle_mul_overflow",
358 BT_FN_VOID_PTR_PTR_PTR
,
359 ATTR_COLD_NOTHROW_LEAF_LIST
)
360 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW
,
361 "__ubsan_handle_negate_overflow",
363 ATTR_COLD_NOTHROW_LEAF_LIST
)
364 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE
,
365 "__ubsan_handle_load_invalid_value",
367 ATTR_COLD_NOTHROW_LEAF_LIST
)
368 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT
,
369 "__ubsan_handle_divrem_overflow_abort",
370 BT_FN_VOID_PTR_PTR_PTR
,
371 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
372 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT
,
373 "__ubsan_handle_shift_out_of_bounds_abort",
374 BT_FN_VOID_PTR_PTR_PTR
,
375 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
376 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE_ABORT
,
377 "__ubsan_handle_vla_bound_not_positive_abort",
379 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
380 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT
,
381 "__ubsan_handle_type_mismatch_abort",
383 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
384 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW_ABORT
,
385 "__ubsan_handle_add_overflow_abort",
386 BT_FN_VOID_PTR_PTR_PTR
,
387 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
388 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW_ABORT
,
389 "__ubsan_handle_sub_overflow_abort",
390 BT_FN_VOID_PTR_PTR_PTR
,
391 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
392 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW_ABORT
,
393 "__ubsan_handle_mul_overflow_abort",
394 BT_FN_VOID_PTR_PTR_PTR
,
395 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
396 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW_ABORT
,
397 "__ubsan_handle_negate_overflow_abort",
399 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
400 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE_ABORT
,
401 "__ubsan_handle_load_invalid_value_abort",
403 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
404 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW
,
405 "__ubsan_handle_float_cast_overflow",
407 ATTR_COLD_NOTHROW_LEAF_LIST
)
408 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW_ABORT
,
409 "__ubsan_handle_float_cast_overflow_abort",
411 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
412 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS
,
413 "__ubsan_handle_out_of_bounds",
415 ATTR_COLD_NOTHROW_LEAF_LIST
)
416 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS_ABORT
,
417 "__ubsan_handle_out_of_bounds_abort",
419 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)