sanitizer.def 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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-2019 Free Software Foundation, Inc.
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it under
  6. the terms of the GNU General Public License as published by the Free
  7. Software Foundation; either version 3, or (at your option) any later
  8. version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GCC; see the file COPYING3. If not see
  15. <http://www.gnu.org/licenses/>. */
  16. /* Before including this file, you should define a macro:
  17. DEF_BUILTIN_STUB(ENUM, NAME)
  18. DEF_SANITIZER_BUILTIN (ENUM, NAME, TYPE, ATTRS)
  19. See builtins.def for details.
  20. The builtins are created by the C-family of FEs in c-family/c-common.c,
  21. for other FEs by asan.c. */
  22. /* This has to come before all the sanitizer builtins. */
  23. DEF_BUILTIN_STUB(BEGIN_SANITIZER_BUILTINS, (const char *)0)
  24. /* Address Sanitizer */
  25. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_INIT, "__asan_init",
  26. BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
  27. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_VERSION_MISMATCH_CHECK,
  28. "__asan_version_mismatch_check_v8",
  29. BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
  30. /* Do not reorder the BUILT_IN_ASAN_{REPORT,CHECK}* builtins, e.g. cfgcleanup.c
  31. relies on this order. */
  32. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD1, "__asan_report_load1",
  33. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  34. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD2, "__asan_report_load2",
  35. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  36. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD4, "__asan_report_load4",
  37. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  38. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD8, "__asan_report_load8",
  39. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  40. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD16, "__asan_report_load16",
  41. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  42. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD_N, "__asan_report_load_n",
  43. BT_FN_VOID_PTR_PTRMODE,
  44. ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  45. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE1, "__asan_report_store1",
  46. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  47. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE2, "__asan_report_store2",
  48. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  49. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE4, "__asan_report_store4",
  50. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  51. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE8, "__asan_report_store8",
  52. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  53. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE16, "__asan_report_store16",
  54. BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  55. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE_N, "__asan_report_store_n",
  56. BT_FN_VOID_PTR_PTRMODE,
  57. ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
  58. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD1_NOABORT,
  59. "__asan_report_load1_noabort",
  60. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  61. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD2_NOABORT,
  62. "__asan_report_load2_noabort",
  63. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  64. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD4_NOABORT,
  65. "__asan_report_load4_noabort",
  66. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  67. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD8_NOABORT,
  68. "__asan_report_load8_noabort",
  69. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  70. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD16_NOABORT,
  71. "__asan_report_load16_noabort",
  72. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  73. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD_N_NOABORT,
  74. "__asan_report_load_n_noabort",
  75. BT_FN_VOID_PTR_PTRMODE,
  76. ATTR_TMPURE_NOTHROW_LEAF_LIST)
  77. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE1_NOABORT,
  78. "__asan_report_store1_noabort",
  79. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  80. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE2_NOABORT,
  81. "__asan_report_store2_noabort",
  82. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  83. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE4_NOABORT,
  84. "__asan_report_store4_noabort",
  85. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  86. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE8_NOABORT,
  87. "__asan_report_store8_noabort",
  88. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  89. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE16_NOABORT,
  90. "__asan_report_store16_noabort",
  91. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  92. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE_N_NOABORT,
  93. "__asan_report_store_n_noabort",
  94. BT_FN_VOID_PTR_PTRMODE,
  95. ATTR_TMPURE_NOTHROW_LEAF_LIST)
  96. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD1, "__asan_load1",
  97. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  98. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD2, "__asan_load2",
  99. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  100. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD4, "__asan_load4",
  101. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  102. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD8, "__asan_load8",
  103. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  104. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD16, "__asan_load16",
  105. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  106. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOADN, "__asan_loadN",
  107. BT_FN_VOID_PTR_PTRMODE, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  108. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE1, "__asan_store1",
  109. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  110. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE2, "__asan_store2",
  111. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  112. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE4, "__asan_store4",
  113. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  114. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE8, "__asan_store8",
  115. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  116. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE16, "__asan_store16",
  117. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  118. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STOREN, "__asan_storeN",
  119. BT_FN_VOID_PTR_PTRMODE, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  120. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD1_NOABORT, "__asan_load1_noabort",
  121. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  122. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD2_NOABORT, "__asan_load2_noabort",
  123. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  124. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD4_NOABORT, "__asan_load4_noabort",
  125. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  126. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD8_NOABORT, "__asan_load8_noabort",
  127. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  128. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOAD16_NOABORT, "__asan_load16_noabort",
  129. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  130. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_LOADN_NOABORT, "__asan_loadN_noabort",
  131. BT_FN_VOID_PTR_PTRMODE, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  132. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE1_NOABORT, "__asan_store1_noabort",
  133. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  134. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE2_NOABORT, "__asan_store2_noabort",
  135. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  136. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE4_NOABORT, "__asan_store4_noabort",
  137. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  138. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE8_NOABORT, "__asan_store8_noabort",
  139. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  140. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STORE16_NOABORT, "__asan_store16_noabort",
  141. BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  142. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_STOREN_NOABORT, "__asan_storeN_noabort",
  143. BT_FN_VOID_PTR_PTRMODE, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  144. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REGISTER_GLOBALS,
  145. "__asan_register_globals",
  146. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  147. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNREGISTER_GLOBALS,
  148. "__asan_unregister_globals",
  149. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  150. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_HANDLE_NO_RETURN,
  151. "__asan_handle_no_return",
  152. BT_FN_VOID, ATTR_TMPURE_NOTHROW_LEAF_LIST)
  153. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT,
  154. "__asan_before_dynamic_init",
  155. BT_FN_VOID_CONST_PTR, ATTR_NOTHROW_LEAF_LIST)
  156. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_AFTER_DYNAMIC_INIT,
  157. "__asan_after_dynamic_init",
  158. BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
  159. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_POISON_STACK_MEMORY,
  160. "__asan_poison_stack_memory",
  161. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  162. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNPOISON_STACK_MEMORY,
  163. "__asan_unpoison_stack_memory",
  164. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  165. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_ALLOCA_POISON, "__asan_alloca_poison",
  166. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  167. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_ALLOCAS_UNPOISON, "__asan_allocas_unpoison",
  168. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  169. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_POINTER_COMPARE, "__sanitizer_ptr_cmp",
  170. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  171. DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_POINTER_SUBTRACT, "__sanitizer_ptr_sub",
  172. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  173. /* Thread Sanitizer */
  174. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT, "__tsan_init",
  175. BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
  176. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY, "__tsan_func_entry",
  177. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  178. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_EXIT, "__tsan_func_exit",
  179. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  180. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VPTR_UPDATE, "__tsan_vptr_update",
  181. BT_FN_VOID_PTR_PTR, ATTR_NOTHROW_LEAF_LIST)
  182. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ1, "__tsan_read1",
  183. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  184. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ2, "__tsan_read2",
  185. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  186. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ4, "__tsan_read4",
  187. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  188. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ8, "__tsan_read8",
  189. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  190. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ16, "__tsan_read16",
  191. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  192. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE1, "__tsan_write1",
  193. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  194. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE2, "__tsan_write2",
  195. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  196. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE4, "__tsan_write4",
  197. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  198. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE8, "__tsan_write8",
  199. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  200. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE16, "__tsan_write16",
  201. BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
  202. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_RANGE, "__tsan_read_range",
  203. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  204. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_RANGE, "__tsan_write_range",
  205. BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
  206. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_LOAD,
  207. "__tsan_atomic8_load",
  208. BT_FN_I1_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
  209. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_LOAD,
  210. "__tsan_atomic16_load",
  211. BT_FN_I2_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
  212. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_LOAD,
  213. "__tsan_atomic32_load",
  214. BT_FN_I4_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
  215. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_LOAD,
  216. "__tsan_atomic64_load",
  217. BT_FN_I8_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
  218. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_LOAD,
  219. "__tsan_atomic128_load",
  220. BT_FN_I16_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST)
  221. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_STORE,
  222. "__tsan_atomic8_store",
  223. BT_FN_VOID_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  224. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_STORE,
  225. "__tsan_atomic16_store",
  226. BT_FN_VOID_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  227. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_STORE,
  228. "__tsan_atomic32_store",
  229. BT_FN_VOID_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  230. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_STORE,
  231. "__tsan_atomic64_store",
  232. BT_FN_VOID_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  233. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_STORE,
  234. "__tsan_atomic128_store",
  235. BT_FN_VOID_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  236. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_EXCHANGE,
  237. "__tsan_atomic8_exchange",
  238. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  239. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_EXCHANGE,
  240. "__tsan_atomic16_exchange",
  241. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  242. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_EXCHANGE,
  243. "__tsan_atomic32_exchange",
  244. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  245. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_EXCHANGE,
  246. "__tsan_atomic64_exchange",
  247. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  248. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_EXCHANGE,
  249. "__tsan_atomic128_exchange",
  250. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  251. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_ADD,
  252. "__tsan_atomic8_fetch_add",
  253. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  254. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_ADD,
  255. "__tsan_atomic16_fetch_add",
  256. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  257. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_ADD,
  258. "__tsan_atomic32_fetch_add",
  259. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  260. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_ADD,
  261. "__tsan_atomic64_fetch_add",
  262. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  263. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_ADD,
  264. "__tsan_atomic128_fetch_add",
  265. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  266. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_SUB,
  267. "__tsan_atomic8_fetch_sub",
  268. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  269. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_SUB,
  270. "__tsan_atomic16_fetch_sub",
  271. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  272. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_SUB,
  273. "__tsan_atomic32_fetch_sub",
  274. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  275. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_SUB,
  276. "__tsan_atomic64_fetch_sub",
  277. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  278. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_SUB,
  279. "__tsan_atomic128_fetch_sub",
  280. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  281. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_AND,
  282. "__tsan_atomic8_fetch_and",
  283. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  284. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_AND,
  285. "__tsan_atomic16_fetch_and",
  286. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  287. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_AND,
  288. "__tsan_atomic32_fetch_and",
  289. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  290. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_AND,
  291. "__tsan_atomic64_fetch_and",
  292. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  293. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_AND,
  294. "__tsan_atomic128_fetch_and",
  295. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  296. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_OR,
  297. "__tsan_atomic8_fetch_or",
  298. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  299. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_OR,
  300. "__tsan_atomic16_fetch_or",
  301. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  302. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_OR,
  303. "__tsan_atomic32_fetch_or",
  304. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  305. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_OR,
  306. "__tsan_atomic64_fetch_or",
  307. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  308. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_OR,
  309. "__tsan_atomic128_fetch_or",
  310. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  311. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_XOR,
  312. "__tsan_atomic8_fetch_xor",
  313. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  314. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_XOR,
  315. "__tsan_atomic16_fetch_xor",
  316. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  317. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_XOR,
  318. "__tsan_atomic32_fetch_xor",
  319. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  320. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_XOR,
  321. "__tsan_atomic64_fetch_xor",
  322. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  323. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_XOR,
  324. "__tsan_atomic128_fetch_xor",
  325. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  326. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_FETCH_NAND,
  327. "__tsan_atomic8_fetch_nand",
  328. BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST)
  329. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_FETCH_NAND,
  330. "__tsan_atomic16_fetch_nand",
  331. BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST)
  332. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_FETCH_NAND,
  333. "__tsan_atomic32_fetch_nand",
  334. BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST)
  335. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_FETCH_NAND,
  336. "__tsan_atomic64_fetch_nand",
  337. BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST)
  338. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_FETCH_NAND,
  339. "__tsan_atomic128_fetch_nand",
  340. BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST)
  341. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_STRONG,
  342. "__tsan_atomic8_compare_exchange_strong",
  343. BT_FN_BOOL_VPTR_PTR_I1_INT_INT,
  344. ATTR_NOTHROW_LEAF_LIST)
  345. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_STRONG,
  346. "__tsan_atomic16_compare_exchange_strong",
  347. BT_FN_BOOL_VPTR_PTR_I2_INT_INT,
  348. ATTR_NOTHROW_LEAF_LIST)
  349. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_STRONG,
  350. "__tsan_atomic32_compare_exchange_strong",
  351. BT_FN_BOOL_VPTR_PTR_I4_INT_INT,
  352. ATTR_NOTHROW_LEAF_LIST)
  353. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_STRONG,
  354. "__tsan_atomic64_compare_exchange_strong",
  355. BT_FN_BOOL_VPTR_PTR_I8_INT_INT,
  356. ATTR_NOTHROW_LEAF_LIST)
  357. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_STRONG,
  358. "__tsan_atomic128_compare_exchange_strong",
  359. BT_FN_BOOL_VPTR_PTR_I16_INT_INT,
  360. ATTR_NOTHROW_LEAF_LIST)
  361. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_COMPARE_EXCHANGE_WEAK,
  362. "__tsan_atomic8_compare_exchange_weak",
  363. BT_FN_BOOL_VPTR_PTR_I1_INT_INT,
  364. ATTR_NOTHROW_LEAF_LIST)
  365. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC16_COMPARE_EXCHANGE_WEAK,
  366. "__tsan_atomic16_compare_exchange_weak",
  367. BT_FN_BOOL_VPTR_PTR_I2_INT_INT,
  368. ATTR_NOTHROW_LEAF_LIST)
  369. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC32_COMPARE_EXCHANGE_WEAK,
  370. "__tsan_atomic32_compare_exchange_weak",
  371. BT_FN_BOOL_VPTR_PTR_I4_INT_INT,
  372. ATTR_NOTHROW_LEAF_LIST)
  373. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC64_COMPARE_EXCHANGE_WEAK,
  374. "__tsan_atomic64_compare_exchange_weak",
  375. BT_FN_BOOL_VPTR_PTR_I8_INT_INT,
  376. ATTR_NOTHROW_LEAF_LIST)
  377. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC128_COMPARE_EXCHANGE_WEAK,
  378. "__tsan_atomic128_compare_exchange_weak",
  379. BT_FN_BOOL_VPTR_PTR_I16_INT_INT,
  380. ATTR_NOTHROW_LEAF_LIST)
  381. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_THREAD_FENCE,
  382. "__tsan_atomic_thread_fence",
  383. BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
  384. DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC_SIGNAL_FENCE,
  385. "__tsan_atomic_signal_fence",
  386. BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
  387. /* Undefined Behavior Sanitizer */
  388. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW,
  389. "__ubsan_handle_divrem_overflow",
  390. BT_FN_VOID_PTR_PTR_PTR,
  391. ATTR_COLD_NOTHROW_LEAF_LIST)
  392. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS,
  393. "__ubsan_handle_shift_out_of_bounds",
  394. BT_FN_VOID_PTR_PTR_PTR,
  395. ATTR_COLD_NOTHROW_LEAF_LIST)
  396. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE,
  397. "__ubsan_handle_builtin_unreachable",
  398. BT_FN_VOID_PTR,
  399. ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST)
  400. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MISSING_RETURN,
  401. "__ubsan_handle_missing_return",
  402. BT_FN_VOID_PTR,
  403. ATTR_NORETURN_NOTHROW_LEAF_LIST)
  404. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE,
  405. "__ubsan_handle_vla_bound_not_positive",
  406. BT_FN_VOID_PTR_PTR,
  407. ATTR_COLD_NOTHROW_LEAF_LIST)
  408. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
  409. "__ubsan_handle_type_mismatch_v1",
  410. BT_FN_VOID_PTR_PTR,
  411. ATTR_COLD_NOTHROW_LEAF_LIST)
  412. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW,
  413. "__ubsan_handle_add_overflow",
  414. BT_FN_VOID_PTR_PTR_PTR,
  415. ATTR_COLD_NOTHROW_LEAF_LIST)
  416. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW,
  417. "__ubsan_handle_sub_overflow",
  418. BT_FN_VOID_PTR_PTR_PTR,
  419. ATTR_COLD_NOTHROW_LEAF_LIST)
  420. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW,
  421. "__ubsan_handle_mul_overflow",
  422. BT_FN_VOID_PTR_PTR_PTR,
  423. ATTR_COLD_NOTHROW_LEAF_LIST)
  424. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW,
  425. "__ubsan_handle_negate_overflow",
  426. BT_FN_VOID_PTR_PTR,
  427. ATTR_COLD_NOTHROW_LEAF_LIST)
  428. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE,
  429. "__ubsan_handle_load_invalid_value",
  430. BT_FN_VOID_PTR_PTR,
  431. ATTR_COLD_NOTHROW_LEAF_LIST)
  432. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_POINTER_OVERFLOW,
  433. "__ubsan_handle_pointer_overflow",
  434. BT_FN_VOID_PTR_PTR_PTR,
  435. ATTR_COLD_NOTHROW_LEAF_LIST)
  436. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT,
  437. "__ubsan_handle_divrem_overflow_abort",
  438. BT_FN_VOID_PTR_PTR_PTR,
  439. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  440. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT,
  441. "__ubsan_handle_shift_out_of_bounds_abort",
  442. BT_FN_VOID_PTR_PTR_PTR,
  443. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  444. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE_ABORT,
  445. "__ubsan_handle_vla_bound_not_positive_abort",
  446. BT_FN_VOID_PTR_PTR,
  447. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  448. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
  449. "__ubsan_handle_type_mismatch_v1_abort",
  450. BT_FN_VOID_PTR_PTR,
  451. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  452. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_ADD_OVERFLOW_ABORT,
  453. "__ubsan_handle_add_overflow_abort",
  454. BT_FN_VOID_PTR_PTR_PTR,
  455. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  456. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_SUB_OVERFLOW_ABORT,
  457. "__ubsan_handle_sub_overflow_abort",
  458. BT_FN_VOID_PTR_PTR_PTR,
  459. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  460. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_MUL_OVERFLOW_ABORT,
  461. "__ubsan_handle_mul_overflow_abort",
  462. BT_FN_VOID_PTR_PTR_PTR,
  463. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  464. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NEGATE_OVERFLOW_ABORT,
  465. "__ubsan_handle_negate_overflow_abort",
  466. BT_FN_VOID_PTR_PTR,
  467. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  468. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE_ABORT,
  469. "__ubsan_handle_load_invalid_value_abort",
  470. BT_FN_VOID_PTR_PTR,
  471. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  472. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_POINTER_OVERFLOW_ABORT,
  473. "__ubsan_handle_pointer_overflow_abort",
  474. BT_FN_VOID_PTR_PTR_PTR,
  475. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  476. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW,
  477. "__ubsan_handle_float_cast_overflow",
  478. BT_FN_VOID_PTR_PTR,
  479. ATTR_COLD_NOTHROW_LEAF_LIST)
  480. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_FLOAT_CAST_OVERFLOW_ABORT,
  481. "__ubsan_handle_float_cast_overflow_abort",
  482. BT_FN_VOID_PTR_PTR,
  483. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  484. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS,
  485. "__ubsan_handle_out_of_bounds",
  486. BT_FN_VOID_PTR_PTR,
  487. ATTR_COLD_NOTHROW_LEAF_LIST)
  488. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS_ABORT,
  489. "__ubsan_handle_out_of_bounds_abort",
  490. BT_FN_VOID_PTR_PTR,
  491. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  492. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_ARG,
  493. "__ubsan_handle_nonnull_arg",
  494. BT_FN_VOID_PTR,
  495. ATTR_COLD_NOTHROW_LEAF_LIST)
  496. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_ARG_ABORT,
  497. "__ubsan_handle_nonnull_arg_abort",
  498. BT_FN_VOID_PTR,
  499. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  500. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
  501. "__ubsan_handle_nonnull_return_v1",
  502. BT_FN_VOID_PTR_PTR,
  503. ATTR_COLD_NOTHROW_LEAF_LIST)
  504. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT,
  505. "__ubsan_handle_nonnull_return_v1_abort",
  506. BT_FN_VOID_PTR_PTR,
  507. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  508. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
  509. "__ubsan_handle_invalid_builtin",
  510. BT_FN_VOID_PTR,
  511. ATTR_COLD_NOTHROW_LEAF_LIST)
  512. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT,
  513. "__ubsan_handle_invalid_builtin_abort",
  514. BT_FN_VOID_PTR,
  515. ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
  516. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DYNAMIC_TYPE_CACHE_MISS,
  517. "__ubsan_handle_dynamic_type_cache_miss",
  518. BT_FN_VOID_PTR_PTR_PTR,
  519. ATTR_COLD_NOTHROW_LEAF_LIST)
  520. DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_DYNAMIC_TYPE_CACHE_MISS_ABORT,
  521. "__ubsan_handle_dynamic_type_cache_miss_abort",
  522. BT_FN_VOID_PTR_PTR_PTR,
  523. ATTR_COLD_NOTHROW_LEAF_LIST)
  524. /* Sanitizer coverage */
  525. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_PC,
  526. "__sanitizer_cov_trace_pc",
  527. BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
  528. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CMP1,
  529. "__sanitizer_cov_trace_cmp1",
  530. BT_FN_VOID_UINT8_UINT8, ATTR_NOTHROW_LEAF_LIST)
  531. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CMP2,
  532. "__sanitizer_cov_trace_cmp2",
  533. BT_FN_VOID_UINT16_UINT16, ATTR_NOTHROW_LEAF_LIST)
  534. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CMP4,
  535. "__sanitizer_cov_trace_cmp4",
  536. BT_FN_VOID_UINT32_UINT32, ATTR_NOTHROW_LEAF_LIST)
  537. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CMP8,
  538. "__sanitizer_cov_trace_cmp8",
  539. BT_FN_VOID_UINT64_UINT64, ATTR_NOTHROW_LEAF_LIST)
  540. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
  541. "__sanitizer_cov_trace_const_cmp1",
  542. BT_FN_VOID_UINT8_UINT8, ATTR_NOTHROW_LEAF_LIST)
  543. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
  544. "__sanitizer_cov_trace_const_cmp2",
  545. BT_FN_VOID_UINT16_UINT16, ATTR_NOTHROW_LEAF_LIST)
  546. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
  547. "__sanitizer_cov_trace_const_cmp4",
  548. BT_FN_VOID_UINT32_UINT32, ATTR_NOTHROW_LEAF_LIST)
  549. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
  550. "__sanitizer_cov_trace_const_cmp8",
  551. BT_FN_VOID_UINT64_UINT64, ATTR_NOTHROW_LEAF_LIST)
  552. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CMPF,
  553. "__sanitizer_cov_trace_cmpf",
  554. BT_FN_VOID_FLOAT_FLOAT, ATTR_NOTHROW_LEAF_LIST)
  555. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_CMPD,
  556. "__sanitizer_cov_trace_cmpd",
  557. BT_FN_VOID_DOUBLE_DOUBLE, ATTR_NOTHROW_LEAF_LIST)
  558. DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_SWITCH,
  559. "__sanitizer_cov_trace_switch",
  560. BT_FN_VOID_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
  561. /* This has to come after all the sanitizer builtins. */
  562. DEF_BUILTIN_STUB(END_SANITIZER_BUILTINS, (const char *)0)