[Bug go/89170] FAIL: net/http

ian at airs dot com gcc-bugzilla@gcc.gnu.org
Wed Feb 20 05:03:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89170

--- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
I think this is due to an old bug in const_desc_htab.  output_constant_def will
insert a value into const_desc_htab.  If the hash table already has an entry
with the same hash value, this will cause the insertion to call
compare_constant.  If the constant is an ADDR_EXPR, compare_constant will call
decode_addr_const.  If the constant is an ADDR_EXPR of a number or string,
decode_addr_const will call output_constant_def.  This recursive call to
output_constant_def will in its turn insert a value into const_desc_htab.  If
the hash table is at just the right point, that recursive call can grow the
hash table.  That will change the indexes that the outer hash table insertion
is dealing with.  The eventual result is that the outer call to
output_constant_def returns a location that holds an entirely different
constant value.  It's an unlikely chain of events, but for this particular test
case it causes a function to be called with the wrong string constant, leading
to the test failure.


More information about the Gcc-bugs mailing list