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

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

Issue 547903002: Oilpan: blink_heap_unittests: asan check failed. HeapObjectHeader::finalize zap a wrong memory for … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« 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: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index c8e359c17277a8a700cbd1c404dcbfc10df98b35..3b593341fb132806be33f8dc7cc3c43f01df7149 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -484,7 +484,9 @@ void HeapObjectHeader::finalize(const GCInfo* gcInfo, Address object, size_t obj
object[i] = finalizedZapValue;
// Zap the primary vTable entry (secondary vTable entries are not zapped).
- *(reinterpret_cast<uintptr_t*>(object)) = zappedVTable;
+ if (gcInfo->hasVTable()) {
+ *(reinterpret_cast<uintptr_t*>(object)) = zappedVTable;
+ }
#endif
// In Release builds, the entire object is zeroed out when it is added to the free list.
// This happens right after sweeping the page and before the thread commences execution.
« 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