summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2021-04-30 19:00:09 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-04 17:18:22 +0000
commit5a97994a1bf0aec9fda23387e95103767d551c36 (patch)
tree9554b262d5e671eb8a2fbad00eb48fb5706ffa2b
parentc02a82e18fe3fc3cf9ed76962fe05c22bf376332 (diff)
downloadmongo-bd1f707.tar.gz
SERVER-56962 Use .denylist suffix for etc/ sanitizer filesbd1f707
-rw-r--r--SConstruct70
-rw-r--r--etc/asan.denylist (renamed from etc/asan.blacklist)0
-rw-r--r--etc/tsan.denylist (renamed from etc/tsan.blacklist)0
-rw-r--r--etc/ubsan.denylist (renamed from etc/ubsan.blacklist)4
4 files changed, 37 insertions, 37 deletions
diff --git a/SConstruct b/SConstruct
index 41507b16786..3582c4b068c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3539,50 +3539,50 @@ def doConfigure(myenv):
myenv.ConfError('Failed to enable -fsanitize-coverage with flag: {0}', sanitize_coverage_option )
- blackfiles_map = {
- "address" : myenv.File("#etc/asan.blacklist"),
- "thread" : myenv.File("#etc/tsan.blacklist"),
- "undefined" : myenv.File("#etc/ubsan.blacklist"),
+ denyfiles_map = {
+ "address" : myenv.File("#etc/asan.denylist"),
+ "thread" : myenv.File("#etc/tsan.denylist"),
+ "undefined" : myenv.File("#etc/ubsan.denylist"),
}
- # Select those unique black files that are associated with the
+ # Select those unique deny files that are associated with the
# currently enabled sanitizers, but filter out those that are
# zero length.
- blackfiles = {v for (k, v) in blackfiles_map.items() if k in sanitizer_list}
- blackfiles = [f for f in blackfiles if os.stat(f.path).st_size != 0]
-
- # Filter out any blacklist options that the toolchain doesn't support.
- supportedBlackfiles = []
- blackfilesTestEnv = myenv.Clone()
- for blackfile in blackfiles:
- if AddToCCFLAGSIfSupported(blackfilesTestEnv, f"-fsanitize-blacklist={blackfile}"):
- supportedBlackfiles.append(blackfile)
- blackfilesTestEnv = None
- supportedBlackfiles = sorted(supportedBlackfiles)
-
- # If we ended up with any blackfiles after the above filters,
+ denyfiles = {v for (k, v) in denyfiles_map.items() if k in sanitizer_list}
+ denyfiles = [f for f in denyfiles if os.stat(f.path).st_size != 0]
+
+ # Filter out any denylist options that the toolchain doesn't support.
+ supportedDenyfiles = []
+ denyfilesTestEnv = myenv.Clone()
+ for denyfile in denyfiles:
+ if AddToCCFLAGSIfSupported(denyfilesTestEnv, f"-fsanitize-blacklist={denyfile}"):
+ supportedDenyfiles.append(denyfile)
+ denyfilesTestEnv = None
+ supportedDenyfiles = sorted(supportedDenyfiles)
+
+ # If we ended up with any denyfiles after the above filters,
# then expand them into compiler flag arguments, and use a
# generator to return at command line expansion time so that
# we can change the signature if the file contents change.
- if supportedBlackfiles:
+ if supportedDenyfiles:
# Unconditionally using the full path can affect SCons cached builds, so we only do
# this in cases where we know it's going to matter.
if 'ICECC' in env and env['ICECC']:
# Make these files available to remote icecream builds if requested.
# These paths *must* be absolute to match the paths in the remote
# toolchain archive.
- blacklist_options=[
- f"-fsanitize-blacklist={blackfile.get_abspath()}"
- for blackfile in supportedBlackfiles
+ denylist_options=[
+ f"-fsanitize-blacklist={denyfile.get_abspath()}"
+ for denyfile in supportedDenyfiles
]
- # If a sanitizer is in use with a blacklist file, we have to ensure they get
+ # If a sanitizer is in use with a denylist file, we have to ensure they get
# added to the toolchain package that gets sent to the remote hosts so they
# can be found by the remote compiler.
- env.Append(ICECC_CREATE_ENV_ADDFILES=supportedBlackfiles)
+ env.Append(ICECC_CREATE_ENV_ADDFILES=supportedDenyfiles)
else:
- blacklist_options=[
- f"-fsanitize-blacklist={blackfile.path}"
- for blackfile in supportedBlackfiles
+ denylist_options=[
+ f"-fsanitize-blacklist={denyfile.path}"
+ for denyfile in supportedDenyfiles
]
if 'CCACHE' in env and env['CCACHE']:
@@ -3590,22 +3590,22 @@ def doConfigure(myenv):
# -fsanitize-blacklist at all or only support one instance of it. This will
# work on any version of ccache because the point is only to ensure that the
# resulting hash for any compiled object is guaranteed to take into account
- # the effect of any sanitizer blacklist files used as part of the build.
+ # the effect of any sanitizer denylist files used as part of the build.
# TODO: This will no longer be required when the following pull requests/
# issues have been merged and deployed.
# https://github.com/ccache/ccache/pull/258
# https://github.com/ccache/ccache/issues/318
- env.Append(CCACHE_EXTRAFILES=supportedBlackfiles)
+ env.Append(CCACHE_EXTRAFILES=supportedDenyfiles)
- def SanitizerBlacklistGenerator(source, target, env, for_signature):
+ def SanitizerDenylistGenerator(source, target, env, for_signature):
if for_signature:
- return [f.get_csig() for f in supportedBlackfiles]
- return blacklist_options
+ return [f.get_csig() for f in supportedDenyfiles]
+ return denylist_options
myenv.AppendUnique(
- SANITIZER_BLACKLIST_GENERATOR=SanitizerBlacklistGenerator,
- CCFLAGS="${SANITIZER_BLACKLIST_GENERATOR}",
- LINKFLAGS="${SANITIZER_BLACKLIST_GENERATOR}",
+ SANITIZER_DENYLIST_GENERATOR=SanitizerDenylistGenerator,
+ CCFLAGS="${SANITIZER_DENYLIST_GENERATOR}",
+ LINKFLAGS="${SANITIZER_DENYLIST_GENERATOR}",
)
symbolizer_option = ""
diff --git a/etc/asan.blacklist b/etc/asan.denylist
index e69de29bb2d..e69de29bb2d 100644
--- a/etc/asan.blacklist
+++ b/etc/asan.denylist
diff --git a/etc/tsan.blacklist b/etc/tsan.denylist
index 7cdefe5e595..7cdefe5e595 100644
--- a/etc/tsan.blacklist
+++ b/etc/tsan.denylist
diff --git a/etc/ubsan.blacklist b/etc/ubsan.denylist
index 9504035bc27..fb4451599ec 100644
--- a/etc/ubsan.blacklist
+++ b/etc/ubsan.denylist
@@ -18,12 +18,12 @@ src:src/third_party/zlib-*/*
# See SERVER-29505.
src:src/third_party/timelib-*/*
-# Blacklisting these functions due to a bug in libstdc++:
+# Denylisting these functions due to a bug in libstdc++:
# http://stackoverflow.com/questions/30122500/is-this-code-really-undefined-as-clang-seems-to-indicate
fun:_ZStaNRSt13_Ios_FmtflagsS_
fun:_ZStanSt13_Ios_FmtflagsS_
-# Blacklisting these functions due to a bug in libstdc++:
+# Denylisting these functions due to a bug in libstdc++:
# Maybe https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60734 or similar
fun:_ZNSt8_Rb_tree*_M_get_insert_hint_unique_posESt23*
fun:_ZNSt8_Rb_tree*_M_insert_I*