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

Unified Diff: Source/platform/heap/Heap.cpp

Issue 141713008: Use new ASAN APIs for scanning ASAN fake stacks during garbage collection. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and disable strict finalization checking. Created 6 years, 9 months 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 | « Source/platform/heap/AddressSanitizer.h ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index 0091151e14ce57de5b7d2477ec6d7e37239baf0e..6f8949b1c471af3e5899a0b5fd9cb4be6ac68e48 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -683,11 +683,18 @@ void ThreadHeap<Header>::getScannedStats(HeapStats& scannedStats)
}
#endif
+// STRICT_ASAN_FINALIZATION_CHECKING turns on poisoning of all objects during
+// sweeping to catch cases where dead objects touch eachother. This is not
+// turned on by default because it also triggers for cases that are safe.
+// Examples of such safe cases are context life cycle observers and timers
+// embedded in garbage collected objects.
+#define STRICT_ASAN_FINALIZATION_CHECKING 0
+
template<typename Header>
void ThreadHeap<Header>::sweep()
{
ASSERT(isConsistentForGC());
-#if defined(ADDRESS_SANITIZER)
+#if defined(ADDRESS_SANITIZER) && STRICT_ASAN_FINALIZATION_CHECKING
// When using ASAN do a pre-sweep where all unmarked objects are poisoned before
// calling their finalizer methods. This can catch the cases where one objects
// finalizer tries to modify another object as part of finalization.
« no previous file with comments | « Source/platform/heap/AddressSanitizer.h ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698