[PATCH] Add -fsanitize=leak to driver options.

Sergey Matveev earthdok at google.com
Wed May 22 06:06:16 PDT 2013


  > From the user's perspective, you have two separate checkers here, one for leaks and one for address errors, and it makes sense for there to be separate flags controlling them.

  Leak detection in ASan is controlled by a run-time flag. The only effect of specifying "-sanitize=leaks" or "-fno-sanitize=leaks" would be to set the default value for that flag, but the leak detector would still be there in either case. This seems like an unnecessary conflation of run-time and compile-time options.

  As per our offline discussion, in this revision both "-sanitize=leaks" and "-no-sanitize=leaks" are silently ignored in the presence of "-sanitize=address" (which is admittedly not a perfect solution).

http://llvm-reviews.chandlerc.com/D837



More information about the cfe-commits mailing list