-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
Bugzilla Link | 1110 |
Resolution | FIXED |
Resolved on | Nov 07, 2018 00:17 |
Version | 1.0 |
OS | All |
Attachments | testcase |
CC | @asl |
Extended Description
Steps to reproduce:
$ llvm/Debug/bin/opt -etforest -break-crit-edges -domtree x.bc -disable-output
Segmentation fault
The backtrace shows an infinite loop
#123147 0x085b20b7 in llvm::DominatorTree::getNodeForBlock (this=0x87191f8,
BB=0x0) at Dominators.cpp:380
but before that, it seems that llvm::DominatorTree::calculate's "ImmDom", which
is gets from ImmediateDominator is out of date:
#174577 0x085b225f in llvm::DominatorTree::calculate (this=0x87191f8,
ID=@0x871a1a8) at Dominators.cpp:399
399 Node *IDomNode = getNodeForBlock(ImmDom);
(gdb) p ImmDom
$2 = (class llvm::BasicBlock *) 0x8719838
(gdb) p ImmDom->getName()
Cannot access memory at address 0xff75effc
(gdb) down
#174576 0x085b20b7 in llvm::DominatorTree::getNodeForBlock (this=0x87191f8,
BB=0x8719838) at Dominators.cpp:380
380 Node *IDomNode = getNodeForBlock(IDom);
(gdb) p IDom
$3 = (class llvm::BasicBlock *) 0x0
and that's the start of the infinite loop.