[cfe-dev] lsan for LLVM bootstrap; leaks in TableGen

Kostya Serebryany kcc at google.com
Wed Dec 25 07:05:38 PST 2013


We are trying to enable LeakSanitizer on our asan/msan llvm bootstrap bot
In clang itself there are two leaks
and one lsan-hostile feature (http://llvm.org/bugs/show_bug.cgi?id=18320),
all of which are easy to fix.

And there are also lots of leaks in TableGen.
Would anyone be interested in fixing TableGen leaks?
I'd guess not since TableGen is not a user-facing utility, leaks there are
not too harmful.
If so, I'd like to disable lsan for TableGen so that
we can enable lsan on the bootstrap bot soon. Objections?


Index: utils/TableGen/TableGen.cpp
--- utils/TableGen/TableGen.cpp (revision 198007)
+++ utils/TableGen/TableGen.cpp (working copy)
@@ -180,3 +180,7 @@

   return TableGenMain(argv[0], &LLVMTableGenMain);
+extern "C" {
+int __lsan_is_turned_off() { return 1; }
+}  // extern "C"
Index: tools/clang/utils/TableGen/TableGen.cpp
--- tools/clang/utils/TableGen/TableGen.cpp     (revision 198007)
+++ tools/clang/utils/TableGen/TableGen.cpp     (working copy)
@@ -248,3 +248,7 @@

   return TableGenMain(argv[0], &ClangTableGenMain);
+extern "C" {
+int __lsan_is_turned_off() { return 1; }
+}  // extern "C"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131225/cacd24c3/attachment.html>

More information about the cfe-dev mailing list