Re: Memory corruption due to word sharing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Aldy Hernandez <aldyh@xxxxxxxxxx>
- Subject: Re: Memory corruption due to word sharing
- From: Michael Matz <matz@xxxxxxx>
- Date: Thu, 2 Feb 2012 17:28:30 +0100 (CET)
- Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Jakub Jelinek <jakub@xxxxxxxxxx>, Torvald Riegel <triegel@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, dsterba@xxxxxxx, ptesarik@xxxxxxx, rguenther@xxxxxxx, gcc@xxxxxxxxxxx
- In-reply-to: <874nv9qlau.fsf@houston.quesejoda.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <20120201151918.GC16714@quack.suse.cz> <CA+55aFy55Q=+pFCZcS9cOM6SL+ZT3sNDB+c4qFvVqwwSpTqJ7g@mail.gmail.com> <1328118174.15992.6206.camel@triegel.csb> <20120201194025.GG6148@sunsite.ms.mff.cuni.cz> <CA+55aFzVWjqcs1zRF-93_9yHRDS-YgmpgFTzACw6HQ-059U06Q@mail.gmail.com> <20120201201631.GW18768@tyan-ft48-01.lab.bos.redhat.com> <CA+55aFwcLpD2Cw5VxZ3ym66QBDAeDam3-hprivrC+keUMXJOtw@mail.gmail.com> <874nv9qlau.fsf@houston.quesejoda.com>
Hi,
On Thu, 2 Feb 2012, Aldy Hernandez wrote:
> > Seriously - is there any real argument *against* just using the base
> > type as a hint for access size?
>
> If I'm on the hook for attempting to fix this again, I'd also like to
> know if there are any arguments against using the base type.
Sure. Simplest example: struct s {int i:24;} __attribute__((packed)).
You must access only three bytes, no matter what. The basetype (int) is
four bytes.
Ciao,
Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]