Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implementadaptive spinning

From: Linus Torvalds
Date: Mon Jan 12 2009 - 15:12:37 EST




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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/