From a164bf5e8934c236f687bfec39128de70b6c9c96 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Wed, 18 Dec 2013 13:25:45 +0000 Subject: [PATCH] [msan] Disable DynamoRio detection. This code is not robust enough and triggers when simply linking with libdynamorio.so, without any code translation at all. Disabling it is safe (i.e. we may unpoison too much memory and see false negatives, but never false positives). llvm-svn: 197568 --- compiler-rt/lib/msan/msan.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/compiler-rt/lib/msan/msan.cc b/compiler-rt/lib/msan/msan.cc index ae1011314aab..cee62c520126 100644 --- a/compiler-rt/lib/msan/msan.cc +++ b/compiler-rt/lib/msan/msan.cc @@ -75,19 +75,7 @@ extern "C" SANITIZER_WEAK_ATTRIBUTE const int __msan_keep_going; namespace __msan { static bool IsRunningUnderDr() { - bool result = false; - MemoryMappingLayout proc_maps(/*cache_enabled*/true); - const sptr kBufSize = 4095; - char *filename = (char*)MmapOrDie(kBufSize, __FUNCTION__); - while (proc_maps.Next(/* start */0, /* end */0, /* file_offset */0, - filename, kBufSize, /* protection */0)) { - if (internal_strstr(filename, "libdynamorio") != 0) { - result = true; - break; - } - } - UnmapOrDie(filename, kBufSize); - return result; + return false; } void EnterSymbolizer() { ++is_in_symbolizer; }