Explicitly unpoison FDs for MSan.
MSan doesn't handle inline assembly that's used by FD_ZERO causing a
false positive.
R=earthdok@chromium.org, henrike@webrtc.org
BUG=chromium:344505
Review URL: https://webrtc-codereview.appspot.com/25799004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7388 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/physicalsocketserver.cc b/webrtc/base/physicalsocketserver.cc
index cff5e4d..3b12547 100644
--- a/webrtc/base/physicalsocketserver.cc
+++ b/webrtc/base/physicalsocketserver.cc
@@ -14,6 +14,10 @@
#include <assert.h>
+#ifdef MEMORY_SANITIZER
+#include <sanitizer/msan_interface.h>
+#endif
+
#if defined(WEBRTC_POSIX)
#include <string.h>
#include <errno.h>
@@ -1311,6 +1315,13 @@
FD_ZERO(&fdsRead);
fd_set fdsWrite;
FD_ZERO(&fdsWrite);
+ // Explicitly unpoison these FDs on MemorySanitizer which doesn't handle the
+ // inline assembly in FD_ZERO.
+ // http://crbug.com/344505
+#ifdef MEMORY_SANITIZER
+ __msan_unpoison(&fdsRead, sizeof(fdsRead));
+ __msan_unpoison(&fdsWrite, sizeof(fdsWrite));
+#endif
fWait_ = true;