[PATCH] [Msan] Generalize mapping facilities to add FreeBSD support

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon Nov 24 11:07:14 PST 2014


================
Comment at: lib/msan/msan_linux.cc:101
@@ -76,5 +100,3 @@
 
-  if (prot1 && !Mprotect(kBad1Beg, kBad1End - kBad1Beg))
-    return false;
-  if (prot2 && !Mprotect(kBad2Beg, kBad2End - kBad2Beg))
-    return false;
+  TakeMapRange(kShadowBeg, kShadowSize, false);
+  if (init_origins) TakeMapRange(kOriginsBeg, kOriginsSize, false);
----------------
Ah, these calls should be rewritten to check returning values.

http://reviews.llvm.org/D6387






More information about the llvm-commits mailing list