From bc8316b265e5ed082ec3fc9e015f1f3e5db80623 Mon Sep 17 00:00:00 2001 From: Martin Pelikan Date: Tue, 30 Jan 2018 13:25:25 +0000 Subject: [XRay] [compiler-rt] stop writing garbage in naive log records Summary: Turns out sizeof(packed) isn't as strong as we'd hoped. This makes sure that when we initialize the padding, all 12 bytes will be zero. Reviewers: dberris, kpw, eizan Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D42494 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@323755 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/xray/xray_records.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/xray/xray_records.h b/include/xray/xray_records.h index d4b7b4c31..18cc042c6 100644 --- a/include/xray/xray_records.h +++ b/include/xray/xray_records.h @@ -96,7 +96,7 @@ struct alignas(32) XRayRecord { uint32_t TId = 0; // Use some bytes in the end of the record for buffers. - char Buffer[4] = {}; + char Buffer[12] = {}; } __attribute__((packed)); static_assert(sizeof(XRayRecord) == 32, "XRayRecord != 32 bytes"); -- cgit v1.2.3