This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] tell gcc optimizer to never introduce new data races
- From: Linus Torvalds <torvalds at linux-foundation dot org>
- To: Jiri Kosina <jkosina at suse dot cz>
- Cc: "Paul E. McKenney" <paulmck at linux dot vnet dot ibm dot com>, Peter Zijlstra <peterz at infradead dot org>, Andrew Morton <akpm at linux-foundation dot org>, Martin Jambor <mjambor at suse dot cz>, Petr Mladek <pmladek at suse dot cz>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Jun 2014 10:46:22 -0700
- Subject: Re: [PATCH] tell gcc optimizer to never introduce new data races
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1406101517300 dot 9378 at pobox dot suse dot cz>
On Tue, Jun 10, 2014 at 6:23 AM, Jiri Kosina <jkosina@suse.cz> wrote:
> We have been chasing a memory corruption bug, which turned out to be
> caused by very old gcc (4.3.4), which happily turned conditional load into
> a non-conditional one, and that broke correctness (the condition was met
> only if lock was held) and corrupted memory.
Just out of interest, can you point to the particular kernel code that
caused this? I think that's more interesting than the example program
you show - which I'm sure is really nice for gcc developers as an
example, but from a kernel standpoint I think it's more important to
show the particular problems this caused for the kernel?
Linus