r198858 - Disable LeakSanitizer in TableGen binaries, see PR18325
Jordan Rose
jordan_rose at apple.com
Thu Jan 9 10:11:31 PST 2014
On Jan 9, 2014, at 10:07, Alp Toker <alp at nuanti.com> wrote:
> If there was an ifdef in TableGen there'd be no problem. The trouble is there is no ifdef...
>
> utils/TableGen/TableGen.cpp:
>
> int main(int argc, char **argv) {
> sys::PrintStackTraceOnErrorSignal();
> PrettyStackTraceProgram X(argc, argv);
> cl::ParseCommandLineOptions(argc, argv);
>
> return TableGenMain(argv[0], &LLVMTableGenMain);
> }
>
> extern "C" {
> // Disable LeakSanitizer for this binary as it has too many leaks that are not
> // very interesting to fix. __lsan_is_turned_off is explained in
> // compiler-rt/include/sanitizer/lsan_interface.h
> int __lsan_is_turned_off() { return 1; }
> } // extern "C"
>
> Kostya said he preferred not to conditionalize the definition, but provide it unconditionally.
>
> That's why I've been trying to help find a name that can be legitimately defined in ordinary builds.
>
> If that's no longer a requirement, I'm absolutely fine to guard it with ifdef LEAK_SANITIZER and be done with it.
>
> (If that ends up being the resolution, it's a little unfortunate for compiler-rt because a well-chosen name would have solved the problem for all projects. Either approach is acceptable though in terms of a resolution though from my POV.)
Ahhh. Okay, I see your point. It's not a problem to provide this here; it's a problem if we ever compile TableGen with something other than Clang or GCC. (Or run in an interesting environment, I suppose.) Got it.
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140109/cff95fb0/attachment.html>
More information about the cfe-commits
mailing list