Index: tools/xdisplaycheck/xdisplaycheck.cc |
diff --git a/tools/xdisplaycheck/xdisplaycheck.cc b/tools/xdisplaycheck/xdisplaycheck.cc |
index ea5fe1e1f4f646d939f9fa54b26d5e046ca85907..8c432d1957f424e52c55e33b0973757d1124eec9 100644 |
--- a/tools/xdisplaycheck/xdisplaycheck.cc |
+++ b/tools/xdisplaycheck/xdisplaycheck.cc |
@@ -106,3 +106,10 @@ int main(int argc, char* argv[]) { |
#endif |
return 0; |
} |
+ |
+#if defined(LEAK_SANITIZER) |
+// XOpenDisplay leaks memory if it takes more than one try to connect. This |
+// causes LSan bots to fail. We don't care about memory leaks in xdisplaycheck |
+// anyway, so just disable LSan completely. |
+extern "C" int __lsan_is_turned_off() { return 1; } |
+#endif |