summaryrefslogtreecommitdiffstats
path: root/src/aig/ivy
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-01-23 12:21:29 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-01-23 12:21:29 -0800
commit14457af21aeb475b6d3c42ab1926d41ef00d3887 (patch)
tree73bcf26fa9f16d58eebd8539342984abd4a68165 /src/aig/ivy
parent3906e37c125bbfba718aa6f4d0d48669dbd238fc (diff)
downloadabc-14457af21aeb475b6d3c42ab1926d41ef00d3887.tar.gz
abc-14457af21aeb475b6d3c42ab1926d41ef00d3887.tar.bz2
abc-14457af21aeb475b6d3c42ab1926d41ef00d3887.zip
Bug fix for incorrect memory allocation in main SAT solver, leading to crashes in 'dsec' (correction to the previous fix).
Diffstat (limited to 'src/aig/ivy')
-rw-r--r--src/aig/ivy/ivyFraig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c
index fdf6ea82..2b911861 100644
--- a/src/aig/ivy/ivyFraig.c
+++ b/src/aig/ivy/ivyFraig.c
@@ -2120,7 +2120,7 @@ int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pN
{
p->pSat = sat_solver_new();
sat_solver_setnvars( p->pSat, 1000 );
- p->pSat->factors = ABC_CALLOC( double, 1000 );
+ p->pSat->factors = ABC_CALLOC( double, p->pSat->cap );
p->nSatVars = 1;
// var 0 is reserved for const1 node - add the clause
// pLits[0] = toLit( 0 );
@@ -2272,7 +2272,7 @@ int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew )
{
p->pSat = sat_solver_new();
sat_solver_setnvars( p->pSat, 1000 );
- p->pSat->factors = ABC_CALLOC( double, 1000 );
+ p->pSat->factors = ABC_CALLOC( double, p->pSat->cap );
p->nSatVars = 1;
// var 0 is reserved for const1 node - add the clause
// pLits[0] = toLit( 0 );