replace-blacklist-with-ignorelist.patch 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. From 9d080c0934b848ee4a05013c78641e612fcc1e03 Mon Sep 17 00:00:00 2001
  2. From: Dylan Cutler <dylancutler@google.com>
  3. Date: Wed, 26 May 2021 16:39:52 +0000
  4. Subject: [PATCH] Reland "Replace 'blacklist' with 'ignorelist' in
  5. ./tools/msan/."
  6. This is a reland of 3b6263f2eece1264b052dfdcbc03b851d5abfb48
  7. Relanding now that https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2897974 is merged
  8. Original change's description:
  9. > Replace 'blacklist' with 'ignorelist' in ./tools/msan/.
  10. >
  11. > Bug: 1097272, 1097268
  12. > Change-Id: Id5c8227a5bfb1ffaec82d3168b609085b10c8297
  13. > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867730
  14. > Commit-Queue: Dylan Cutler <dylancutler@google.com>
  15. > Reviewed-by: Nico Weber <thakis@chromium.org>
  16. > Reviewed-by: Jonathan Metzman <metzman@chromium.org>
  17. > Cr-Commit-Position: refs/heads/master@{#883035}
  18. Bug: 1097272
  19. Bug: 1097268
  20. Change-Id: I11a5bc8972680c95fb1dab95ed3b707ed76f4667
  21. Cq-Include-Trybots: luci.chromium.try:chromeos-amd64-generic-cfi-thin-lto-rel
  22. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2911096
  23. Commit-Queue: Dylan Cutler <dylancutler@google.com>
  24. Reviewed-by: Nico Weber <thakis@chromium.org>
  25. Cr-Commit-Position: refs/heads/master@{#886773}
  26. ---
  27. build/config/sanitizers/BUILD.gn | 44 ++++++++++----------
  28. build_overrides/build.gni | 14 +++----
  29. tools/msan/{blacklist.txt => ignorelist.txt} | 0
  30. 3 files changed, 29 insertions(+), 29 deletions(-)
  31. rename tools/msan/{blacklist.txt => ignorelist.txt} (100%)
  32. diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
  33. index aaaad023474d..55b388a43743 100644
  34. --- a/build/config/sanitizers/BUILD.gn
  35. +++ b/build/config/sanitizers/BUILD.gn
  36. @@ -272,11 +272,11 @@ config("asan_flags") {
  37. if (is_asan) {
  38. cflags += [ "-fsanitize=address" ]
  39. if (is_win) {
  40. - if (!defined(asan_win_blacklist_path)) {
  41. - asan_win_blacklist_path =
  42. + if (!defined(asan_win_blocklist_path)) {
  43. + asan_win_blocklist_path =
  44. rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
  45. }
  46. - cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
  47. + cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
  48. }
  49. }
  50. }
  51. @@ -306,13 +306,13 @@ config("link_shared_library") {
  52. config("cfi_flags") {
  53. cflags = []
  54. if (is_cfi && current_toolchain == default_toolchain) {
  55. - if (!defined(cfi_blacklist_path)) {
  56. - cfi_blacklist_path =
  57. + if (!defined(cfi_ignorelist_path)) {
  58. + cfi_ignorelist_path =
  59. rebase_path("//tools/cfi/ignores.txt", root_build_dir)
  60. }
  61. cflags += [
  62. "-fsanitize=cfi-vcall",
  63. - "-fsanitize-blacklist=$cfi_blacklist_path",
  64. + "-fsanitize-ignorelist=$cfi_ignorelist_path",
  65. ]
  66. if (use_cfi_cast) {
  67. @@ -409,14 +409,14 @@ config("msan_flags") {
  68. if (is_msan) {
  69. assert(is_linux || is_chromeos,
  70. "msan only supported on linux x86_64/ChromeOS")
  71. - if (!defined(msan_blacklist_path)) {
  72. - msan_blacklist_path =
  73. - rebase_path("//tools/msan/blacklist.txt", root_build_dir)
  74. + if (!defined(msan_ignorelist_path)) {
  75. + msan_ignorelist_path =
  76. + rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
  77. }
  78. cflags = [
  79. "-fsanitize=memory",
  80. "-fsanitize-memory-track-origins=$msan_track_origins",
  81. - "-fsanitize-blacklist=$msan_blacklist_path",
  82. + "-fsanitize-ignorelist=$msan_ignorelist_path",
  83. ]
  84. }
  85. }
  86. @@ -424,13 +424,13 @@ config("msan_flags") {
  87. config("tsan_flags") {
  88. if (is_tsan) {
  89. assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
  90. - if (!defined(tsan_blacklist_path)) {
  91. - tsan_blacklist_path =
  92. + if (!defined(tsan_ignorelist_path)) {
  93. + tsan_ignorelist_path =
  94. rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
  95. }
  96. cflags = [
  97. "-fsanitize=thread",
  98. - "-fsanitize-blacklist=$tsan_blacklist_path",
  99. + "-fsanitize-ignorelist=$tsan_ignorelist_path",
  100. ]
  101. }
  102. }
  103. @@ -438,8 +438,8 @@ config("tsan_flags") {
  104. config("ubsan_flags") {
  105. cflags = []
  106. if (is_ubsan) {
  107. - if (!defined(ubsan_blacklist_path)) {
  108. - ubsan_blacklist_path =
  109. + if (!defined(ubsan_ignorelist_path)) {
  110. + ubsan_ignorelist_path =
  111. rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
  112. }
  113. cflags += [
  114. @@ -456,7 +456,7 @@ config("ubsan_flags") {
  115. "-fsanitize=signed-integer-overflow",
  116. "-fsanitize=unreachable",
  117. "-fsanitize=vla-bound",
  118. - "-fsanitize-blacklist=$ubsan_blacklist_path",
  119. + "-fsanitize-ignorelist=$ubsan_ignorelist_path",
  120. ]
  121. # Chromecast ubsan builds fail to compile with these
  122. @@ -486,8 +486,8 @@ config("ubsan_no_recover") {
  123. config("ubsan_security_flags") {
  124. if (is_ubsan_security) {
  125. - if (!defined(ubsan_security_blacklist_path)) {
  126. - ubsan_security_blacklist_path =
  127. + if (!defined(ubsan_security_ignorelist_path)) {
  128. + ubsan_security_ignorelist_path =
  129. rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
  130. }
  131. cflags = [
  132. @@ -495,7 +495,7 @@ config("ubsan_security_flags") {
  133. "-fsanitize=shift",
  134. "-fsanitize=signed-integer-overflow",
  135. "-fsanitize=vla-bound",
  136. - "-fsanitize-blacklist=$ubsan_security_blacklist_path",
  137. + "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
  138. ]
  139. }
  140. }
  141. @@ -508,13 +508,13 @@ config("ubsan_null_flags") {
  142. config("ubsan_vptr_flags") {
  143. if (is_ubsan_vptr) {
  144. - if (!defined(ubsan_vptr_blacklist_path)) {
  145. - ubsan_vptr_blacklist_path =
  146. + if (!defined(ubsan_vptr_ignorelist_path)) {
  147. + ubsan_vptr_ignorelist_path =
  148. rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
  149. }
  150. cflags = [
  151. "-fsanitize=vptr",
  152. - "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
  153. + "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
  154. ]
  155. }
  156. }
  157. diff --git a/build_overrides/build.gni b/build_overrides/build.gni
  158. index 82627b03653f..f3e563ab701b 100644
  159. --- a/build_overrides/build.gni
  160. +++ b/build_overrides/build.gni
  161. @@ -42,15 +42,15 @@ declare_args() {
  162. # Allows different projects to specify their own suppression/ignore lists for
  163. # sanitizer tools.
  164. # asan_suppressions_file = "path/to/asan_suppressions.cc"
  165. -# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
  166. +# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
  167. # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
  168. # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
  169. -# tsan_blacklist_path = "path/to/tsan/ignores.txt"
  170. -# msan_blacklist_path = "path/to/msan/blacklist.txt"
  171. -# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
  172. -# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
  173. -# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
  174. -# cfi_blacklist_path = "path/to/cfi/ignores.txt"
  175. +# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
  176. +# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
  177. +# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
  178. +# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
  179. +# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
  180. +# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
  181. declare_args() {
  182. # Android 32-bit non-component, non-clang builds cannot have symbol_level=2
  183. diff --git a/tools/msan/blacklist.txt b/tools/msan/ignorelist.txt
  184. similarity index 100%
  185. rename from tools/msan/blacklist.txt
  186. rename to tools/msan/ignorelist.txt