summaryrefslogtreecommitdiff
path: root/include/xray
diff options
context:
space:
mode:
authorMartin Pelikan <martin.pelikan@gmail.com>2018-01-30 13:25:25 +0000
committerMartin Pelikan <martin.pelikan@gmail.com>2018-01-30 13:25:25 +0000
commitbc8316b265e5ed082ec3fc9e015f1f3e5db80623 (patch)
tree9b489c2c77dba32b29f1c2724acfcc92b80c2b52 /include/xray
parent3db13318de6d830f5b0ecc55fed8ec7e4a5bc6e2 (diff)
[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
Diffstat (limited to 'include/xray')
-rw-r--r--include/xray/xray_records.h2
1 files changed, 1 insertions, 1 deletions
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");