corbbtprof: set byte alignment for CORBBTPROF structures (#25816)
authorKonstantin Baladurin <k.baladurin@samsung.com>
Tue, 23 Jul 2019 04:01:22 +0000 (07:01 +0300)
committerGleb Balykov <g.balykov@samsung.com>
Wed, 25 Mar 2020 12:29:41 +0000 (15:29 +0300)
Fix patch fixes SIGBUG that occurs due to unaligned read/write

src/inc/corbbtprof.h

index f7258c1..419a7f0 100644 (file)
@@ -275,6 +275,8 @@ enum SectionFormat
     SectionFormatInvalid                = -1
 };
 
+#include <pshpack1.h>
+
 struct CORBBTPROF_SECTION_TABLE_ENTRY
 {
     SectionFormat                  FormatID;
@@ -589,4 +591,7 @@ struct CORBBTPROF_BLOB_POOL_ENTRY
     DWORD                  cBuffer;
     BYTE                   buffer[0];  // actually 'cBuffer' in length
 };
+
+#include <poppack.h>
+
 #endif /* COR_BBTPROF_H_ */