[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
@@ -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");
