On Fri, May 29, 2015 at 05:40:16PM +1000, Bruce Evans wrote: > On Thu, 28 May 2015, Brooks Davis wrote: > > > Log: > > Revert r102953 > > > > The bitfile padding was always unallocated on real-world FreeBSD systems > > and > > depended on the assumption that (abs(sizeof(long) - sizeof(char*)) <= 32). > > Actually, it was bit-field padding that depended on the assumption that > (abs(sizeof(long) - sizeof(char*)) <= CHAR_BIT * sizeof(int). > > It did work under this assumption, and was needed on non-real-world FreeBSD > systems with correctly-sized longs. Why break it?
It doesn't work on CHERI where pointers are 64, 128 or 256 bits depending on the compilation mode and hardware type (in the latter two cases they are not arithmetic types). If this was something we were worried about in practice, forcing the alignment of n_name and n_type to max(sizeof(long), sizeof(char *)) would accomplish the padding in a way that works for any compiler we care about and irrespective of size. -- Brooks
pgpqhhPE8mdFc.pgp
Description: PGP signature