diff options
author | Martin Pelikan <martin.pelikan@gmail.com> | 2018-01-30 13:25:25 +0000 |
---|---|---|
committer | Martin Pelikan <martin.pelikan@gmail.com> | 2018-01-30 13:25:25 +0000 |
commit | dbc61983d0d63634548eb5843289894abc5b63c5 (patch) | |
tree | 65f2fbee3f6b8df9ee9a6825a23db2bccce6bfc4 /compiler-rt/include | |
parent | d45e5e2d27cf74c6527914995a545b542d606676 (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
Diffstat (limited to 'compiler-rt/include')
-rw-r--r-- | compiler-rt/include/xray/xray_records.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/include/xray/xray_records.h b/compiler-rt/include/xray/xray_records.h index d4b7b4c31a9..18cc042c6c7 100644 --- a/compiler-rt/include/xray/xray_records.h +++ b/compiler-rt/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"); |