mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	fix crash regression
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									d1854ab4d2
								
							
						
					
					
						commit
						209d31346b
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -2294,8 +2294,8 @@ namespace sat {
 | 
			
		|||
            // literal is no longer watched.
 | 
			
		||||
            return l_undef;
 | 
			
		||||
        }
 | 
			
		||||
        SASSERT(index <= bound);
 | 
			
		||||
        SASSERT(c[index] == alit);
 | 
			
		||||
        VERIFY(index <= bound);
 | 
			
		||||
        VERIFY(c[index] == alit);
 | 
			
		||||
        
 | 
			
		||||
        // find a literal to swap with:
 | 
			
		||||
        for (unsigned i = bound + 1; i < sz; ++i) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -182,7 +182,8 @@ namespace sat {
 | 
			
		|||
            literal  l(v, false);
 | 
			
		||||
            literal r  = roots[v];
 | 
			
		||||
            SASSERT(v != r.var());            
 | 
			
		||||
            if (m_solver.is_external(v) || !m_solver.set_root(l, r)) {
 | 
			
		||||
            if (m_solver.is_external(v)) {
 | 
			
		||||
                m_solver.set_root(l, r);
 | 
			
		||||
                // cannot really eliminate v, since we have to notify extension of future assignments
 | 
			
		||||
                m_solver.mk_bin_clause(~l, r, false);
 | 
			
		||||
                m_solver.mk_bin_clause(l, ~r, false);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue