berkeley-abc/abc

Discussion(Resub): Potential bug point when collecting divisor.

wjrforcyber opened this issue · 0 comments

Just a discussion here.
Anyone has encountered with core dump when collecting divisors in resub?
Sorry I couldn't provide detailed bug point or any BLIF here since the case is quite huge.
Me myself seldom see resub crash either, but from the stack trace report, it seems the Abc_ObjFanin0 or Abc_ObjFanin1 has crashed.
Code block:

void Abc_ManResubCollectDivs_rec( Abc_Obj_t * pNode, Vec_Ptr_t * vInternal )
{
    // skip visited nodes
    if ( Abc_NodeIsTravIdCurrent(pNode) )
        return;
    Abc_NodeSetTravIdCurrent(pNode);
    // collect the fanins
    Abc_ManResubCollectDivs_rec( Abc_ObjFanin0(pNode), vInternal );
    Abc_ManResubCollectDivs_rec( Abc_ObjFanin1(pNode), vInternal );
    // collect the internal node
    if ( pNode->fMarkA == 0 ) 
        Vec_PtrPush( vInternal, pNode );
}

Is there any chance that const node would show up during collection? Should we check the node type?