summaryrefslogtreecommitdiffstats
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
commit1e0d3b43eafd48df426f1d9f30382124946ab0fb (patch)
tree9de2b49f78145d787e1fa615f473aa7b4bd2b7a4
parent31cc1ebbc60309e1f6af392c07960054dc1d39c5 (diff)
downloadbcm5719-llvm-1e0d3b43eafd48df426f1d9f30382124946ab0fb.tar.gz
bcm5719-llvm-1e0d3b43eafd48df426f1d9f30382124946ab0fb.zip
[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 llvm-svn: 323755
-rw-r--r--compiler-rt/include/xray/xray_records.h2
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");
OpenPOWER on IntegriCloud