[PATCH] [lsan] Implement __lsan_suppress_object().
Alexey Samsonov
samsonov at google.com
Mon Jun 3 07:20:38 PDT 2013
================
Comment at: include/sanitizer/lsan_interface.h:26
@@ -25,2 +25,3 @@
void __lsan_enable();
-
+ // The heap object into which p points will be treated as a non-leak.
+ void __lsan_suppress_object(const void *p);
----------------
What will happen for this:
int *x = new int[10];
__lsan_suppress_object(x + 5);
Shall we restrict arg value to "the heap object which p points to"?
================
Comment at: lib/lsan/lsan_allocator.cc:217
@@ -201,3 +216,3 @@
if (!__lsan::lsan_disabled) {
- Report("Unmatched call to __lsan_enable().\n");
+ Report("LeakSanitizer: Unmatched call to __lsan_enable().\n");
Die();
----------------
Should you fix this message in ASan as well?
Why don't you print stack trace for this location (and add a test case for it)?
http://llvm-reviews.chandlerc.com/D910
More information about the llvm-commits
mailing list