[LLVMdev] A quick update on FreeBSD support

Bill Wendling isanbard at gmail.com
Mon May 26 01:25:41 PDT 2008


On May 25, 2008, at 1:39 PM, Marcel Moolenaar wrote:
> On May 25, 2008, at 12:58 AM, Bill Wendling wrote:
>
>> Could you try this (massively hacky) patch out to see if it fixes  
>> your
>> problem?
>>
>>
> Alas, it didn't fix the problem:
>
Crumbs.

I think that the analysis I told you before wasn't fully correct. I  
think I mentioned something about "n = 4" and that could cause the  
SmallVector to reallocate things. But that was in error.

I tried it on my Mac, enabling a mode where malloc initializes memory  
with 0xAA and deallocated memory with 0x55, but didn't run into the  
crash that you see here. Perhaps you can track down where the node "4"  
is being created and see if the values for it aren't being  
initialized. If they are being initialized, then set a watch on the  
node to see where they get overwritten.

-bw

> 	...
> gmake[3]: Entering directory `/nfs/llvm/obj/powerpc/lib/Transforms/
> Scalar'
> llvm[3]: Compiling PredicateSimplifier.cpp for Debug build
> /nfs/llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp: In
> constructor '<unnamed>::InequalityGraph::Edge::Edge()':
> /nfs/llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:607:
> warning: format '%p' expects type 'void*', but argument 2 has type
> '<unnamed>::InequalityGraph::Edge*'
> llvm[3]: Building Debug Archive Library libLLVMScalarOpts.a
> gmake[3]: Leaving directory `/nfs/llvm/obj/powerpc/lib/Transforms/
> Scalar'
> 	...
>
> xserve% Debug/bin/opt -predsimplify -disable-output < x.bc
> Assertion failed: (validPredicate(R) && "Invalid predicate."),
> function update, file /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp, line 711.
> Abort (core dumped)
>
>
> (gdb) bt
> #0  0x2229ce08 in kill () from /lib/libc.so.7
> #1  0x22000848 in raise () from /lib/libthr.so.3
> #2  0x2229b6ec in abort () from /lib/libc.so.7
> #3  0x22281d80 in __assert () from /lib/libc.so.7
> #4  0x01c34b4c in update (this=0x200c940, n=1515870810, R=1515870810,
> Subtree=0x20298c0) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp:711
> #5  0x01c3d224 in makeEqual (this=0x7fffd580, V1=0x2009730,
> V2=0x2006624) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp:1626
> #6  0x01c3dc2c in solve (this=0x7fffd580) at /nfs/llvm/src/llvm/lib/
> Transforms/Scalar/PredicateSimplifier.cpp:2165
> #7  0x01c3fa70 in visitBranchInst (this=0x7fffd678, BI=@0x2006714)  
> at /
> nfs/llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:2461
> #8  0x01c3fca4 in visitBr (this=0x7fffd678, I=@0x2006714) at
> Instruction.def:98
> #9  0x01c4014c in visit (this=0x7fffd678, I=@0x2006714) at
> Instruction.def:98
> #10 0x01c40bbc in visitInstruction (this=0x2006790, I=0x2006714,
> DT=0x2029800) at /nfs/llvm/src/llvm/lib/Transforms/Scalar/
> PredicateSimplifier.cpp:2390
> #11 0x01c40d5c in visitBasicBlock (this=0x2006790, Node=0x2029800)  
> at /
> nfs/llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:2334
> #12 0x01c411cc in runOnFunction (this=0x2006790, F=@0x2006510) at / 
> nfs/
> llvm/src/llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:2412
> #13 0x01e84874 in llvm::FPPassManager::runOnFunction (this=0x2021080,
> F=@0x2006510) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1178
> #14 0x01e84aac in llvm::FPPassManager::runOnModule (this=0x2021080,
> M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1198
> #15 0x01e8432c in llvm::MPPassManager::runOnModule (this=0x202c110,
> M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1248
> #16 0x01e84588 in llvm::PassManagerImpl::run (this=0x201d100,
> M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1322
> #17 0x01e84648 in llvm::PassManager::run (this=0x7fffdb40,
> M=@0x20093a0) at /nfs/llvm/src/llvm/lib/VMCore/PassManager.cpp:1354
> #18 0x01a70774 in main (argc=3, argv=0x7fffdbf8) at /nfs/llvm/src/ 
> llvm/
> tools/opt/opt.cpp:431
>
> (gdb) x /x E
> 0x2036390:	0x5a5a5a5a
> (gdb) p n1
> $1 = 5
> (gdb) p *N
> $2 = {_vptr$Node = 0x5a5a5a5a, Relations =
> {<llvm::SmallVectorImpl<<unnamed>::InequalityGraph::Edge>> = {Begin =
> 0x5a5a5a5a, End = 0x5a5a5a5a, Capacity = 0x5a5a5a5a, FirstEl = 90
> 'Z'}, InlineElts = 'Z' <repeats 47 times>}}
>
> FYI,
>
> -- 
> Marcel Moolenaar
> xcllnt at mac.com
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list