Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756865AbZALUMf (ORCPT ); Mon, 12 Jan 2009 15:12:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755382AbZALUMY (ORCPT ); Mon, 12 Jan 2009 15:12:24 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:53230 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755221AbZALUMW (ORCPT ); Mon, 12 Jan 2009 15:12:22 -0500 Date: Mon, 12 Jan 2009 12:11:07 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Bernd Schmidt cc: Andi Kleen , David Woodhouse , Andrew Morton , Ingo Molnar , Harvey Harrison , "H. Peter Anvin" , Chris Mason , Peter Zijlstra , Steven Rostedt , paulmck@linux.vnet.ibm.com, Gregory Haskins , Matthew Wilcox , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Nick Piggin , Peter Morreale , Sven Dietrich , jh@suse.cz Subject: Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning In-Reply-To: <496BA036.3010101@t-online.de> Message-ID: References: <1231676801.25018.150.camel@macbook.infradead.org> <20090111181307.GM26290@one.firstfloor.org> <20090111201427.GP26290@one.firstfloor.org> <1231704939.25018.548.camel@macbook.infradead.org> <20090111203441.GQ26290@one.firstfloor.org> <20090112001255.GR26290@one.firstfloor.org> <20090112005228.GS26290@one.firstfloor.org> <496B86B5.3090707@t-online.de> <496BA036.3010101@t-online.de> User-Agent: Alpine 2.00 (LFD 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: 935 Lines: 23 On Mon, 12 Jan 2009, Bernd Schmidt wrote: > > However, if the compiler chooses to put them into the same stack > location, the RTL-based alias analysis will happily conclude (based on > the differing types) that the reads from A and the writes to B can't > possibly conflict, and some passes may end up reordering them. End > result: overlapping lifetimes and overlapping stack slots. Oops. Yes, I came to the same conclusion. Of course, I knew a-priori that the real bug was using type-based alais analysis to make (statically visible) aliasing decisions, but I realize that there are people who never understood things like that. Sadly, some of them worked on gcc. Linus -- 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/