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
* 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_STORE1
, "__asan_report_store1",
45 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
46 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE2
, "__asan_report_store2",
47 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
48 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE4
, "__asan_report_store4",
49 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
50 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE8
, "__asan_report_store8",
51 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
52 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE16
, "__asan_report_store16",
53 BT_FN_VOID_PTR
, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST
)
54 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REGISTER_GLOBALS
,
55 "__asan_register_globals",
56 BT_FN_VOID_PTR_PTRMODE
, ATTR_NOTHROW_LEAF_LIST
)
57 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNREGISTER_GLOBALS
,
58 "__asan_unregister_globals",
59 BT_FN_VOID_PTR_PTRMODE
, ATTR_NOTHROW_LEAF_LIST
)
60 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_HANDLE_NO_RETURN
,
61 "__asan_handle_no_return",
62 BT_FN_VOID
, ATTR_TMPURE_NOTHROW_LEAF_LIST
)
63 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT
,
64 "__asan_before_dynamic_init",
65 BT_FN_VOID_CONST_PTR
, ATTR_NOTHROW_LEAF_LIST
)
66 DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_AFTER_DYNAMIC_INIT
,
67 "__asan_after_dynamic_init",
68 BT_FN_VOID
, ATTR_NOTHROW_LEAF_LIST
)
70 /* Thread Sanitizer
*/
71 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT
, "__tsan_init",
72 BT_FN_VOID
, ATTR_NOTHROW_LEAF_LIST
)
73 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY
, "__tsan_func_entry",
74 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
75 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_EXIT
, "__tsan_func_exit",
76 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
77 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VPTR_UPDATE
, "__tsan_vptr_update",
78 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
79 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ1
, "__tsan_read1",
80 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
81 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ2
, "__tsan_read2",
82 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
83 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ4
, "__tsan_read4",
84 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
85 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ8
, "__tsan_read8",
86 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
87 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ16
, "__tsan_read16",
88 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
89 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE1
, "__tsan_write1",
90 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
91 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE2
, "__tsan_write2",
92 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
93 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE4
, "__tsan_write4",
94 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
95 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE8
, "__tsan_write8",
96 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
97 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE16
, "__tsan_write16",
98 BT_FN_VOID_PTR
, ATTR_NOTHROW_LEAF_LIST
)
100 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_LOAD
,
101 "__tsan_atomic8_load",
102 BT_FN_I1_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
103 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_LOAD
,
104 "__tsan_atomic16_load",
105 BT_FN_I2_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
106 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_LOAD
,
107 "__tsan_atomic32_load",
108 BT_FN_I4_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
109 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_LOAD
,
110 "__tsan_atomic64_load",
111 BT_FN_I8_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
112 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_LOAD
,
113 "__tsan_atomic128_load",
114 BT_FN_I16_CONST_VPTR_INT
, ATTR_NOTHROW_LEAF_LIST
)
116 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_STORE
,
117 "__tsan_atomic8_store",
118 BT_FN_VOID_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
119 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_STORE
,
120 "__tsan_atomic16_store",
121 BT_FN_VOID_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
122 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_STORE
,
123 "__tsan_atomic32_store",
124 BT_FN_VOID_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
125 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_STORE
,
126 "__tsan_atomic64_store",
127 BT_FN_VOID_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
128 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_STORE
,
129 "__tsan_atomic128_store",
130 BT_FN_VOID_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
132 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_EXCHANGE
,
133 "__tsan_atomic8_exchange",
134 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
135 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_EXCHANGE
,
136 "__tsan_atomic16_exchange",
137 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
138 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_EXCHANGE
,
139 "__tsan_atomic32_exchange",
140 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
141 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_EXCHANGE
,
142 "__tsan_atomic64_exchange",
143 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
144 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_EXCHANGE
,
145 "__tsan_atomic128_exchange",
146 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
148 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_ADD
,
149 "__tsan_atomic8_fetch_add",
150 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
151 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_ADD
,
152 "__tsan_atomic16_fetch_add",
153 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
154 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_ADD
,
155 "__tsan_atomic32_fetch_add",
156 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
157 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_ADD
,
158 "__tsan_atomic64_fetch_add",
159 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
160 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_ADD
,
161 "__tsan_atomic128_fetch_add",
162 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
164 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_SUB
,
165 "__tsan_atomic8_fetch_sub",
166 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
167 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_SUB
,
168 "__tsan_atomic16_fetch_sub",
169 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
170 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_SUB
,
171 "__tsan_atomic32_fetch_sub",
172 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
173 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_SUB
,
174 "__tsan_atomic64_fetch_sub",
175 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
176 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_SUB
,
177 "__tsan_atomic128_fetch_sub",
178 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
180 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_AND
,
181 "__tsan_atomic8_fetch_and",
182 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
183 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_AND
,
184 "__tsan_atomic16_fetch_and",
185 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
186 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_AND
,
187 "__tsan_atomic32_fetch_and",
188 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
189 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_AND
,
190 "__tsan_atomic64_fetch_and",
191 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
192 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_AND
,
193 "__tsan_atomic128_fetch_and",
194 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
196 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_OR
,
197 "__tsan_atomic8_fetch_or",
198 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
199 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_OR
,
200 "__tsan_atomic16_fetch_or",
201 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
202 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_OR
,
203 "__tsan_atomic32_fetch_or",
204 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
205 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_OR
,
206 "__tsan_atomic64_fetch_or",
207 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
208 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_OR
,
209 "__tsan_atomic128_fetch_or",
210 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
212 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_XOR
,
213 "__tsan_atomic8_fetch_xor",
214 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
215 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_XOR
,
216 "__tsan_atomic16_fetch_xor",
217 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
218 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_XOR
,
219 "__tsan_atomic32_fetch_xor",
220 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
221 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_XOR
,
222 "__tsan_atomic64_fetch_xor",
223 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
224 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_XOR
,
225 "__tsan_atomic128_fetch_xor",
226 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
228 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_NAND
,
229 "__tsan_atomic8_fetch_nand",
230 BT_FN_I1_VPTR_I1_INT
, ATTR_NOTHROW_LEAF_LIST
)
231 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_NAND
,
232 "__tsan_atomic16_fetch_nand",
233 BT_FN_I2_VPTR_I2_INT
, ATTR_NOTHROW_LEAF_LIST
)
234 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_NAND
,
235 "__tsan_atomic32_fetch_nand",
236 BT_FN_I4_VPTR_I4_INT
, ATTR_NOTHROW_LEAF_LIST
)
237 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_NAND
,
238 "__tsan_atomic64_fetch_nand",
239 BT_FN_I8_VPTR_I8_INT
, ATTR_NOTHROW_LEAF_LIST
)
240 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_NAND
,
241 "__tsan_atomic128_fetch_nand",
242 BT_FN_I16_VPTR_I16_INT
, ATTR_NOTHROW_LEAF_LIST
)
244 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_STRONG
,
245 "__tsan_atomic8_compare_exchange_strong",
246 BT_FN_BOOL_VPTR_PTR_I1_INT_INT
,
247 ATTR_NOTHROW_LEAF_LIST
)
248 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_STRONG
,
249 "__tsan_atomic16_compare_exchange_strong",
250 BT_FN_BOOL_VPTR_PTR_I2_INT_INT
,
251 ATTR_NOTHROW_LEAF_LIST
)
252 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_STRONG
,
253 "__tsan_atomic32_compare_exchange_strong",
254 BT_FN_BOOL_VPTR_PTR_I4_INT_INT
,
255 ATTR_NOTHROW_LEAF_LIST
)
256 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_STRONG
,
257 "__tsan_atomic64_compare_exchange_strong",
258 BT_FN_BOOL_VPTR_PTR_I8_INT_INT
,
259 ATTR_NOTHROW_LEAF_LIST
)
260 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_STRONG
,
261 "__tsan_atomic128_compare_exchange_strong",
262 BT_FN_BOOL_VPTR_PTR_I16_INT_INT
,
263 ATTR_NOTHROW_LEAF_LIST
)
265 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_WEAK
,
266 "__tsan_atomic8_compare_exchange_weak",
267 BT_FN_BOOL_VPTR_PTR_I1_INT_INT
,
268 ATTR_NOTHROW_LEAF_LIST
)
269 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_WEAK
,
270 "__tsan_atomic16_compare_exchange_weak",
271 BT_FN_BOOL_VPTR_PTR_I2_INT_INT
,
272 ATTR_NOTHROW_LEAF_LIST
)
273 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_WEAK
,
274 "__tsan_atomic32_compare_exchange_weak",
275 BT_FN_BOOL_VPTR_PTR_I4_INT_INT
,
276 ATTR_NOTHROW_LEAF_LIST
)
277 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_WEAK
,
278 "__tsan_atomic64_compare_exchange_weak",
279 BT_FN_BOOL_VPTR_PTR_I8_INT_INT
,
280 ATTR_NOTHROW_LEAF_LIST
)
281 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_WEAK
,
282 "__tsan_atomic128_compare_exchange_weak",
283 BT_FN_BOOL_VPTR_PTR_I16_INT_INT
,
284 ATTR_NOTHROW_LEAF_LIST
)
286 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_THREAD_FENCE
,
287 "__tsan_atomic_thread_fence",
288 BT_FN_VOID_INT
, ATTR_NOTHROW_LEAF_LIST
)
289 DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_SIGNAL_FENCE
,
290 "__tsan_atomic_signal_fence",
291 BT_FN_VOID_INT
, ATTR_NOTHROW_LEAF_LIST
)
293 /* Undefined Behavior Sanitizer
*/
294 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW
,
295 "__ubsan_handle_divrem_overflow",
296 BT_FN_VOID_PTR_PTR_PTR
,
297 ATTR_COLD_NOTHROW_LEAF_LIST
)
298 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS
,
299 "__ubsan_handle_shift_out_of_bounds",
300 BT_FN_VOID_PTR_PTR_PTR
,
301 ATTR_COLD_NOTHROW_LEAF_LIST
)
302 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE
,
303 "__ubsan_handle_builtin_unreachable",
305 ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST
)
306 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MISSING_RETURN
,
307 "__ubsan_handle_missing_return",
309 ATTR_NORETURN_NOTHROW_LEAF_LIST
)
310 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE
,
311 "__ubsan_handle_vla_bound_not_positive",
313 ATTR_COLD_NOTHROW_LEAF_LIST
)
314 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH
,
315 "__ubsan_handle_type_mismatch",
317 ATTR_COLD_NOTHROW_LEAF_LIST
)
318 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW
,
319 "__ubsan_handle_add_overflow",
320 BT_FN_VOID_PTR_PTR_PTR
,
321 ATTR_COLD_NOTHROW_LEAF_LIST
)
322 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW
,
323 "__ubsan_handle_sub_overflow",
324 BT_FN_VOID_PTR_PTR_PTR
,
325 ATTR_COLD_NOTHROW_LEAF_LIST
)
326 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW
,
327 "__ubsan_handle_mul_overflow",
328 BT_FN_VOID_PTR_PTR_PTR
,
329 ATTR_COLD_NOTHROW_LEAF_LIST
)
330 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW
,
331 "__ubsan_handle_negate_overflow",
333 ATTR_COLD_NOTHROW_LEAF_LIST
)
334 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE
,
335 "__ubsan_handle_load_invalid_value",
337 ATTR_COLD_NOTHROW_LEAF_LIST
)