[augeas-devel] [PATCH] Fix crasher in ast.c:dict_pos on i686 with gcc 4.5 and -O2

David Lutterkort lutter at redhat.com
Thu Nov 18 10:19:52 UTC 2010


On Wed, 2010-11-17 at 22:21 +0000, Richard W.M. Jones wrote:
> On Fri, Nov 12, 2010 at 02:21:26PM +0000, Matthew Booth wrote:
> > On 11/12/2010 11:24 AM, Matthew Booth wrote:
> > >This patch works around what appears to be an optimization bug in gcc 4.5. The
> > >symptom of the bug is that dict_pos, called from dict_lookup, receives an
> > >invalid value when accessing dict->used. The following ticket describes the bug,
> > >and includes a simple test case:
> > 
> > I just filed a gcc BZ here:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46452
> 
> Boxgrinder appears to hit this bug regularly, so we are keen to get a
> fix.  (Unfortunately since I don't have access to EC2 I can't run the
> necessary bits to see if the patch is good).
> 
> Is there a pressing reason why we use bitfields in that struct?

Premature optimization on my part.

David





More information about the augeas-devel mailing list