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

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

Issue 556443003: Oilpan: Fix ASan instrumentation around heap object headers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index c8e359c17277a8a700cbd1c404dcbfc10df98b35..4589276894091c85e23037e6fa79952fc66b3796 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -412,14 +412,15 @@ private:
bool m_parkedAllThreads; // False if we fail to park all threads
};
+NO_SANITIZE_ADDRESS
bool HeapObjectHeader::isMarked() const
{
checkHeader();
- // We need to unpoison/poison the header on ASAN since
- // acquireLoad doesn't have the NO_SANITIZE_ADDRESS flag.
- ASAN_UNPOISON_MEMORY_REGION(this, sizeof(this));
+#if defined(ADDRESS_SANITIZER)
zerny-chromium 2014/09/09 06:01:28 ditto
Mads Ager (chromium) 2014/09/09 08:22:14 Done
+ unsigned size = asanAcquireLoad(&m_size);
+#else
unsigned size = acquireLoad(&m_size);
- ASAN_POISON_MEMORY_REGION(this, sizeof(this));
+#endif
return size & markBitMask;
}

Powered by Google App Engine
This is Rietveld 408576698