[zypp-commit] r9668 - /trunk/sat-solver/src/solver.c
Author: mlschroe Date: Wed Apr 16 16:26:58 2008 New Revision: 9668 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9668&view=rev Log: - fix segfault in solver (bnc#380406) Modified: trunk/sat-solver/src/solver.c Modified: trunk/sat-solver/src/solver.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=9668&r1=9667&r2=9668&view=diff ============================================================================== --- trunk/sat-solver/src/solver.c (original) +++ trunk/sat-solver/src/solver.c Wed Apr 16 16:26:58 2008 @@ -788,11 +788,7 @@ whyp = solv->learnt_pool.elements + solv->learnt_why.elements[i - solv->learntrules]; while ((why = *whyp++) != 0) { -#if 0 - if (why < 0) - continue; /* rpm assertion */ -#endif - assert(why < i); + assert(why > 0 && why < i); if (!solv->rules[why].w1) break; } @@ -1645,17 +1641,11 @@ vv = v > 0 ? v : -v; if (!MAPTST(&seen, vv)) continue; + l = solv->decisionmap[vv]; + if (l != 1 && l != -1) + continue; why = solv->decisionq_why.elements[idx]; - if (!why) - { - queue_push(&solv->learnt_pool, -vv); - IF_POOLDEBUG (SAT_DEBUG_ANALYZE) - { - POOL_DEBUG(SAT_DEBUG_ANALYZE, "RPM ASSERT Rule:\n"); - printruleelement(solv, SAT_DEBUG_ANALYZE, 0, v); - } - continue; - } + assert(why); queue_push(&solv->learnt_pool, why); c = solv->rules + why; dp = c->d ? pool->whatprovidesdata + c->d : 0; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
mlschroe@svn.opensuse.org