bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc bug causes parted to write bad GPT entries


From: Richard Hirst
Subject: gcc bug causes parted to write bad GPT entries
Date: Fri, 15 Mar 2002 21:56:45 +0000
User-agent: Mutt/1.3.24i

Hi,

https://external-lists.vasoftware.com/archives//linux-ia64/2002-March/003158.html

There is a bug in gcc 2.96 and 3.0.4 (but apparently fixed in 3.1)
relating to ((packed)) structures, which is causing parted to write
some Partition Type GUIDs offset by some number of bytes.  Under debian
and RedHat (parted 1.4) this has been observed to write the guid with a
leading byte of 0x00:

0000480  00 a2 a0 d0 eb e5 b9 33 44 87 c0 68 b6 b7 26 99
0000490  83 79 f1 c4 f9 32 46 f7 9a 51 cc 85 c5 d8 a9 68
00004a0  00 28 03 00 00 00 00 00 00 40 06 00 00 00 00 00
00004b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

instead of

0000480  a2 a0 d0 eb e5 b9 33 44 87 c0 68 b6 b7 26 99 c7
0000490  83 79 f1 c4 f9 32 46 f7 9a 51 cc 85 c5 d8 a9 68
00004a0  00 28 03 00 00 00 00 00 00 40 06 00 00 00 00 00
00004b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


The proposed work-around for the compiler bug is to redefine efi_guid_t
to be an array of 16 bytes, rather than a packed struct.  That approach
is favoured by David Mosberger and Matt Domsch anyway, to avoid byte
ordering issues.

I'm about to work up such a patch, for 1.4 initially.

Richard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]