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; |