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

Unified Diff: src/zone.h

Issue 208743004: ASan support for the Zone (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments 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 | « build/standalone.gypi ('k') | src/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone.h
diff --git a/src/zone.h b/src/zone.h
index bd7cc39b0c4f224b0646792fbd8ed262fdc5f986..75224a6ac8b177b2e14cbc032ae4897d0a7c6fed 100644
--- a/src/zone.h
+++ b/src/zone.h
@@ -89,8 +89,13 @@ class Zone {
// All pointers returned from New() have this alignment. In addition, if the
// object being allocated has a size that is divisible by 8 then its alignment
- // will be 8.
+ // will be 8. ASan requires 8-byte alignment.
+#ifdef ADDRESS_SANITIZER
+ static const int kAlignment = 8;
+ STATIC_ASSERT(kPointerSize <= 8);
+#else
static const int kAlignment = kPointerSize;
+#endif
// Never allocate segments smaller than this size in bytes.
static const int kMinimumSegmentSize = 8 * KB;
« no previous file with comments | « build/standalone.gypi ('k') | src/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698