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


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

David





More information about the augeas-devel mailing list