Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: third_party/WebKit/Source/wtf/LeakAnnotations.h

Issue 1511833006: Document LEAK_SANITIZER_IGNORE_OBJECT() more precisely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/LeakAnnotations.h
diff --git a/third_party/WebKit/Source/wtf/LeakAnnotations.h b/third_party/WebKit/Source/wtf/LeakAnnotations.h
index 446992db6abf6cfefb9bc9473bcd08dc45da6daf..6ce298fbdd404ebdb1b3c7217b9638dcd17c8530 100644
--- a/third_party/WebKit/Source/wtf/LeakAnnotations.h
+++ b/third_party/WebKit/Source/wtf/LeakAnnotations.h
@@ -34,11 +34,7 @@
// This file defines macros for working with LeakSanitizer, allowing memory
// and allocations to be registered as exempted from LSan consideration.
-//
-// LSan exempted memory will be treated as a source of live pointers,
-// i.e. heap objects reachable by following pointers from an exempted
-// object will not be reported as leaks.
-//
+
#include "wtf/Noncopyable.h"
#if USE(LEAK_SANITIZER)
#include "wtf/AddressSanitizer.h"
@@ -74,6 +70,15 @@ public:
// LEAK_SANITIZER_IGNORE_OBJECT(X): the heap object referenced by pointer X
// will be ignored by LSan.
+//
+// "Ignorance" means that LSan's leak detection pass will not consider the
+// ignored memory chunk as leaking. Furthermore, the LSan reachability
+// pass will not scan an ignored memory chunk for live, reachable pointers.
+// So, should any of the pointers of that ignored chunk not be reachable
+// from elsewhere, they'll be unreachable and thus not be reported as leaking.
+//
+// Notice that LSan will not transitively compute what's reachable from an
+// ignored memory chunk and consider that set as ignored and unreachable.
haraken 2015/12/11 09:46:36 Slightly better: lsan_ignore_object(X) means that
sof 2015/12/11 10:03:37 A bit too brief perhaps? It ignores the object at
#define LEAK_SANITIZER_IGNORE_OBJECT(X) __lsan_ignore_object(X)
// If the object pointed to by the static local is on the Oilpan heap, a strong
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698