[llvm] r224058 - LeakDetector: Simplify code and fix comments, NFC

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Dec 19 04:57:51 PST 2014


On 19 December 2014 at 04:19, Alexander Potapenko <glider at google.com> wrote:
> AFAIK neither Valgrind nor LSan are able to detect leaked objects that
> reference each other.
> Moreover, it is theoretically possible to get a false negative if
> somewhere in the memory there's a value that looks like a pointer to a
> leaked object (or a cluster of objects).
> The leak detector built directly into IR can do a better job.

Both asan and valgrind find the leak in the attached testcase.

In practice, I have seen both asan and valgrind find bugs in llvm more
often than the leak checker:

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141219/3d17bdd6/attachment.cpp>


More information about the llvm-commits mailing list