summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shell_utils.cpp
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-09-15 14:14:12 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2016-09-15 14:16:38 -0400
commitd0d28ea7b664cf1fefbc33fe4751e0a70d29b7fa (patch)
treea03301ceee4653a998b8830b0e8c8997d81e82f6 /src/mongo/shell/shell_utils.cpp
parent4b9ef4fb0a71b5e03d9083afdae884e860cd5f98 (diff)
downloadmongo-d0d28ea7b664cf1fefbc33fe4751e0a70d29b7fa.tar.gz
SERVER-25488 Added JavaScript funciton to mongo shell to check for sanitizer builds
_isAddressSanitizerActive() _isLeakSanitizerActive() _isThreadSanitizerActive() _isUndefinedBehaviorSanitizerActive()
Diffstat (limited to 'src/mongo/shell/shell_utils.cpp')
-rw-r--r--src/mongo/shell/shell_utils.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp
index 1e79ab36f0a..20c199fc652 100644
--- a/src/mongo/shell/shell_utils.cpp
+++ b/src/mongo/shell/shell_utils.cpp
@@ -154,23 +154,6 @@ BSONObj isWindows(const BSONObj& a, void* data) {
#endif
}
-BSONObj isAddressSanitizerActive(const BSONObj& a, void* data) {
- bool isSanitized = false;
-// See the following for information on how we detect address sanitizer in clang and gcc.
-//
-// - http://clang.llvm.org/docs/AddressSanitizer.html#has-feature-address-sanitizer
-// - https://gcc.gnu.org/ml/gcc-patches/2012-11/msg01827.html
-//
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
- isSanitized = true;
-#endif
-#elif defined(__SANITIZE_ADDRESS__)
- isSanitized = true;
-#endif
- return BSON("" << isSanitized);
-}
-
BSONObj getBuildInfo(const BSONObj& a, void* data) {
uassert(16822, "getBuildInfo accepts no arguments", a.nFields() == 0);
BSONObjBuilder b;
@@ -236,7 +219,6 @@ void installShellUtils(Scope& scope) {
scope.injectNative("_srand", JSSrand);
scope.injectNative("_rand", JSRand);
scope.injectNative("_isWindows", isWindows);
- scope.injectNative("_isAddressSanitizerActive", isAddressSanitizerActive);
scope.injectNative("interpreterVersion", interpreterVersion);
scope.injectNative("getBuildInfo", getBuildInfo);
scope.injectNative("isKeyTooLarge", isKeyTooLarge);