This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] tell gcc optimizer to never introduce new data races
- From: Jiri Kosina <jkosina at suse dot cz>
- To: Linus Torvalds <torvalds at linux-foundation dot org>
- 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 at vger dot kernel dot org, gcc at gcc dot gnu dot org
- Date: Thu, 21 Aug 2014 01:27:56 +0200 (CEST)
- 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, 10 Jun 2014, Jiri Kosina 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.
> This particular problem with that particular code did not happen when
> never gccs were used. I've brought this up with our gcc folks, as I wanted
> to make sure that this can't really happen again, and it turns out it
> actually can.
For the record (and for mailinglist archives to catch this information) --
the default has been changed for gcc 4.10 to a sane value (0).
I'd however suggest we keep changes made by commit 69102311a ("./Makefile:
tell gcc optimizer to never introduce new data races") for rather a long