mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	fix crash when api_solver sets reset_tracked_assertions
This commit is contained in:
		
							parent
							
								
									ac105b7d8c
								
							
						
					
					
						commit
						d272acc3ac
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -1678,6 +1678,8 @@ void cmd_context::restore_assertions(unsigned old_sz) { | |||
|         SASSERT(m_assertions.empty()); | ||||
|         return; | ||||
|     } | ||||
|     if (m_assertions.empty()) | ||||
|         return; | ||||
|     if (old_sz == m_assertions.size()) | ||||
|         return; | ||||
|     SASSERT(old_sz < m_assertions.size()); | ||||
|  | @ -2296,6 +2298,8 @@ vector<std::pair<expr*,expr*>> cmd_context::tracked_assertions() { | |||
| } | ||||
| 
 | ||||
| void cmd_context::reset_tracked_assertions() { | ||||
|     for (expr* a : m_assertion_names) | ||||
|         m().dec_ref(a); | ||||
|     m_assertion_names.reset(); | ||||
|     for (expr* a : m_assertions) | ||||
|         m().dec_ref(a); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue