diff options
| -rw-r--r-- | compiler-rt/lib/xray/xray_allocator.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler-rt/lib/xray/xray_allocator.h b/compiler-rt/lib/xray/xray_allocator.h index 8f8e13a7952..d62a6910c3c 100644 --- a/compiler-rt/lib/xray/xray_allocator.h +++ b/compiler-rt/lib/xray/xray_allocator.h @@ -71,8 +71,15 @@ private: static constexpr auto BlockPtrCount = (kCacheLineSize / sizeof(Block *)) - 1; + BlockLink() { + // Zero out Blocks. + // FIXME: Use a braced member initializer when we drop support for GCC + // 4.8. + internal_memset(Blocks, 0, sizeof(Blocks)); + } + // FIXME: Align this to cache-line address boundaries? - Block Blocks[BlockPtrCount]{}; + Block Blocks[BlockPtrCount]; BlockLink *Prev = nullptr; }; |

