corbbtprof: set byte alignment for CORBBTPROF structures (dotnet/coreclr#25816)
authorKonstantin Baladurin <k.baladurin@samsung.com>
Tue, 23 Jul 2019 04:01:22 +0000 (07:01 +0300)
committerJan Kotas <jkotas@microsoft.com>
Tue, 23 Jul 2019 04:01:22 +0000 (06:01 +0200)
Fix patch fixes SIGBUG that occurs due to unaligned read/write

Commit migrated from https://github.com/dotnet/coreclr/commit/53b1a71d230851f32a2bf904ed030f2755bcf253

src/coreclr/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_ */