[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 2 Feb 2012 10:37:59 +0100 (CET)
From: Richard Guenther <rguenther@...e.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Michael Matz <matz@...e.de>, Jiri Kosina <jkosina@...e.cz>,
Colin Walters <walters@...bum.org>, Jan Kara <jack@...e.cz>,
LKML <linux-kernel@...r.kernel.org>, linux-ia64@...r.kernel.org,
dsterba@...e.cz, ptesarik@...e.cz, gcc@....gnu.org
Subject: Re: Memory corruption due to word sharing
On Wed, 1 Feb 2012, Linus Torvalds wrote:
> Just out of morbid curiosity, what happens if you have totally
> *separate* variables that just happen to link together? IOW, something
> like
>
> static struct { unsigned bit:1; } onebit;
> static volatile int var;
>
> and they just *happen* to link next to each other (because they were
> declared next to each other) in the same 8-byte aligned block?
Just to make you run away screaming ...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48124
where exactly such situation happens ...
Richard.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists