On Fri, 20 Nov 2015, Alan Lawrence wrote: > On 6 November 2015 at 10:39, Richard Biener <rguent...@suse.de> wrote: > >> ../spec2000/benchspec/CINT2000/254.gap/src/polynom.c:358:11: error: > >> location > >> references block not in block tree > >> l1_279 = PHI <1(28), l1_299(33)> > > > > ^^^ > > > > this is the error to look at! It means that the GC heap will be corrupted > > quite easily. > > > > This looked very similar to PR68117 - the invalid phi arg, and block > not in block-tree, even if not the invalid tree code - and as the > posters there were having success with valgrind, whereas I wasn't, I > watched and waited. First observation is that it triggers the asserts > you suggested in comment 27 > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D68117#c27). Indeed, it > fails those asserts, even after the patch in comment 25 (committed as > r230594) to tree-ssa.c (delete_tree_ssa), and the patch in comment#35 > to function.c (set_cfun), and the patch in comment#30 (committed as > r230424) to cfgexpand.c (pass_expand::execute). > > The patch in comment#29 (which replaces the asserts in comment#27 with > empties), however, fixes the problem - although I can't rule out, that > that's just by changing the memory allocation pattern. > > Moreover, if I take those patches and rebase onto a recent trunk (onto > which the delete_tree_ssa and pass_expand::execute patches have > already been committed), i.e. just adding the assertions from > comment#27 and the call in function.c (set_cfun) - the assertions are > still failing on my testcase, whereas the original (assertionless) > failure was very erratic, and had since disappeared/been hidden on > trunk. Indeed those same assertions break in a few other places (even > in a --disable-bootstrap build after gcc/xgcc is built), so I feel I > have a good chance of producing a reasonable assertion-breaking > testcase. > > So I have to ask, how sure are you that those assertions are(/should > be!) "correct"? :)
Ideally they should be correct but they happen to be not (and I think the intent was that this should be harmless). Basically I tried to assert that nobody creates stale edge redirect data that is not later consumed or cleared. Happens to be too optimistic :/ Richard.