[compiler-rt] 7f191e6 - [NFC][xray] Initialize XRayFileHeader

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 18:52:45 PDT 2023


Author: Vitaly Buka
Date: 2023-05-11T18:52:30-07:00
New Revision: 7f191e6d2c9ec4af1819c4e80a5453583cd72f08

URL: https://github.com/llvm/llvm-project/commit/7f191e6d2c9ec4af1819c4e80a5453583cd72f08
DIFF: https://github.com/llvm/llvm-project/commit/7f191e6d2c9ec4af1819c4e80a5453583cd72f08.diff

LOG: [NFC][xray] Initialize XRayFileHeader

Avoids reports with msan -fno-inline.

Added: 
    

Modified: 
    compiler-rt/include/xray/xray_records.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/include/xray/xray_records.h b/compiler-rt/include/xray/xray_records.h
index 89ccb4df2bde6..4789509c2c241 100644
--- a/compiler-rt/include/xray/xray_records.h
+++ b/compiler-rt/include/xray/xray_records.h
@@ -45,14 +45,14 @@ struct alignas(32) XRayFileHeader {
 
   // What follows are a set of flags that indicate useful things for when
   // reading the data in the file.
-  bool ConstantTSC : 1;
-  bool NonstopTSC : 1;
+  bool ConstantTSC : 1 = false;
+  bool NonstopTSC : 1 = false;
 
   // The frequency by which TSC increases per-second.
   alignas(8) uint64_t CycleFrequency = 0;
 
   union {
-    char FreeForm[16];
+    char FreeForm[16] = {};
     // The current civiltime timestamp, as retrieved from 'clock_gettime'. This
     // allows readers of the file to determine when the file was created or
     // written down.


        


More information about the llvm-commits mailing list