Merge pull request #471 from phyzhenli/master

Fix &synch2 crash with creating wrong mapping
This commit is contained in:
alanminko 2026-03-07 06:54:56 -08:00 committed by GitHub
commit 7553ef9760
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -1838,6 +1838,12 @@ static inline int Lf_ManDerivePart( Lf_Man_t * p, Gia_Man_t * pNew, Vec_Int_t *
}
pTruth = Lf_CutTruth( p, pCut );
iLit = Kit_TruthToGia( pNew, (unsigned *)pTruth, Vec_IntSize(vLeaves), vCover, vLeaves, 0 );
// do not create LUT in the simple case
if ( Abc_Lit2Var(iLit) == 0 )
return iLit;
Vec_IntForEachEntry( vLeaves, iTemp, k )
if ( Abc_Lit2Var(iLit) == Abc_Lit2Var(iTemp) )
return iLit;
// create mapping
Vec_IntSetEntry( vMapping, Abc_Lit2Var(iLit), Vec_IntSize(vMapping2) );
Vec_IntPush( vMapping2, Vec_IntSize(vLeaves) );