[LLVMdev] A quick update on FreeBSD support
Bill Wendling
isanbard at gmail.com
Sun May 25 00:38:29 PDT 2008
On May 24, 2008, at 4:25 PM, Marcel Moolenaar wrote:
>
> On May 24, 2008, at 12:12 PM, Bill Wendling wrote:
>
>> Let us know if you would like extra eyes on the two PPC failures.
>> Many
>> of us have a lot of experience with C++. :-) Do you know where these
>> allocations are?
>
> I don't mind if people help out, so here's some information:
>
> FAIL: /nfs/llvm/src/llvm/test/Transforms/PredicateSimplifier/
> 2006-11-04-ReplacingZeros.ll
> Failed with signal(SIGABRT) at line 1
> while running: llvm-as < /nfs/llvm/src/llvm/test/Transforms/
> PredicateSimplifier/2006-11-04-ReplacingZeros.ll | opt -predsimplify -
> disable-output
> Assertion failed: (validPredicate(R) && "Invalid predicate."),
> function update, file /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp, line 702.
>
> xserve% Debug/bin/llvm-as < /nfs/llvm/src/llvm/test/Transforms/
> PredicateSimplifier/2006-11-04-ReplacingZeros.ll > x.bc
>
> xserve% gdb Debug/bin/opt
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
...
> #3 0x22281d80 in __assert () from /lib/libc.so.7
> #4 0x01c34a78 in update (this=0x200c940, n=1515870810, R=1515870810,
> Subtree=0x20298c0) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp:702
> #5 0x01c3d134 in makeEqual (this=0x7fffd550, V1=0x2009730,
> V2=0x2006624) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp:1614
...
> (gdb) frame 5
> #5 0x01c3d134 in makeEqual (this=0x7fffd550, V1=0x2009730,
> V2=0x2006624) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp:1614
> 1614 IG.node(n1)->update(NI->To, NI->LV, Top);
> (gdb) p NI
> $1 = ((anonymous namespace)::InequalityGraph::Edge *) 0x2036390
> (gdb) p /x *NI
> $2 = {To = 0x5a5a5a5a, LV = 0x5a5a5a5a, Subtree = 0x5a5a5a5a}
> (gdb) p NE
> $3 = ((anonymous namespace)::InequalityGraph::Edge *) 0x203639c
> (gdb) p /x *NE
> $4 = {To = 0x5a5a5a5a, LV = 0x5a5a5a5a, Subtree = 0x5a5a5a5a}
>
> Both NI and NE are defined by the for loop:
>
> 1603 for (Node::iterator NI = IG.node(n)->begin(), NE =
> IG.node(n)->end();
> 1604 NI != NE; ++NI) {
>
> In this case:
>
> (gdb) p n
> $5 = 4
> (gdb) p IG.node(n)->begin()
> $12 = ((anonymous namespace)::InequalityGraph::Edge *) 0x1f59378
> (gdb) p IG.node(n)->end()
> $14 = ((anonymous namespace)::InequalityGraph::Edge *) 0xa5a5a5a5
>
Before it hits these "update" calls, what is the value of *NI and n?
My hypothesis is that the first "update" call is invalidating the NI/
NE iterators because it's inserting things into the list. Because the
SmallVector is only declared to hold 4 things, the 5th iteration (n ==
4) would cause it to reallocate the internal storage. If both NI->To
and n are the same, then this would cause NI (and NE) to get bad values.
-bw
More information about the llvm-dev
mailing list