[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 11:41:24 UTC 2010


On Thu, 2010-11-18 at 11:13 +0000, Matthew Booth wrote:
> On 11/18/2010 10:19 AM, David Lutterkort wrote:
> > On Fri, 2010-11-12 at 11:24 +0000, 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:
> >>
> >> https://fedorahosted.org/augeas/ticket/149
> >
> > ACK. Nice sleuthing. I like this fix better than forcing the compiler to
> > not optimize in dict_pos since this fix makes it less likely that we get
> > an invalid dict->used anyway.
> >
> > Just pushed as commit c17cd53d
> 
> Thanks, David. Do you mind if I push new builds to F13 and F14?

No, go ahead. I am trying to release 0.7.4 by the end of the week, but
this seems important enough to issue a patched 0.7.3 in case 0.7.4
doesn't happen as quickly as hoped ;)

David





More information about the augeas-devel mailing list