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

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

Issue 556443003: Oilpan: Fix ASan instrumentation around heap object headers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. 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
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | Source/wtf/Atomics.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index 07312d258e0f0ac6630af91ec587a49e7b3063b3..311a2d29715469e1da5d0a488a19ddafe5766899 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -1497,6 +1497,7 @@ Address HeapObjectHeader::payloadEnd()
return reinterpret_cast<Address>(this) + size();
}
+NO_SANITIZE_ADDRESS
void HeapObjectHeader::mark()
{
checkHeader();
@@ -1505,12 +1506,8 @@ void HeapObjectHeader::mark()
// Multiple threads can still read the old value and all store the
// new value. However, the new value will be the same for all of
// the threads and the end result is therefore consistent.
- // We need to unpoison/poison the header on ASAN since
- // acquireLoad/releaseStore don't have the NO_SANITIZE_ADDRESS flag.
- ASAN_UNPOISON_MEMORY_REGION(this, sizeof(this));
- unsigned size = acquireLoad(&m_size);
- releaseStore(&m_size, size | markBitMask);
- ASAN_POISON_MEMORY_REGION(this, sizeof(this));
+ unsigned size = asanAcquireLoad(&m_size);
+ asanReleaseStore(&m_size, size | markBitMask);
}
Address FinalizedHeapObjectHeader::payload()
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | Source/wtf/Atomics.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698