Skip to content

Commit d44a6ea

Browse files
committedMay 31, 2018
Fix GCC 4.8.5 build by avoiding braced default member initializer
Use internal_memset instead. Should revive all Linux Chromium ToT bots. llvm-svn: 333678
1 parent 3aa30e8 commit d44a6ea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

Diff for: ‎compiler-rt/lib/xray/xray_allocator.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,15 @@ template <size_t N> struct Allocator {
7171
static constexpr auto BlockPtrCount =
7272
(kCacheLineSize / sizeof(Block *)) - 1;
7373

74+
BlockLink() {
75+
// Zero out Blocks.
76+
// FIXME: Use a braced member initializer when we drop support for GCC
77+
// 4.8.
78+
internal_memset(Blocks, 0, sizeof(Blocks));
79+
}
80+
7481
// FIXME: Align this to cache-line address boundaries?
75-
Block Blocks[BlockPtrCount]{};
82+
Block Blocks[BlockPtrCount];
7683
BlockLink *Prev = nullptr;
7784
};
7885

0 commit comments

Comments
 (0)