Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754858Ab2BBJiG (ORCPT ); Thu, 2 Feb 2012 04:38:06 -0500 Received: from cantor2.suse.de ([195.135.220.15]:39054 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297Ab2BBJiA (ORCPT ); Thu, 2 Feb 2012 04:38:00 -0500 Date: Thu, 2 Feb 2012 10:37:59 +0100 (CET) From: Richard Guenther To: Linus Torvalds Cc: Michael Matz , Jiri Kosina , Colin Walters , Jan Kara , LKML , linux-ia64@vger.kernel.org, dsterba@suse.cz, ptesarik@suse.cz, gcc@gcc.gnu.org Subject: Re: Memory corruption due to word sharing In-Reply-To: Message-ID: References: <20120201151918.GC16714@quack.suse.cz> <1328114266.5355.44.camel@lenny> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 796 Lines: 24 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/