mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	fix #1276 related crashes for re-sumption after cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									bec60f763b
								
							
						
					
					
						commit
						05428314be
					
				
					 5 changed files with 31 additions and 11 deletions
				
			
		|  | @ -23,12 +23,14 @@ Revision History: | |||
| 
 | ||||
| class reslimit { | ||||
|     volatile unsigned   m_cancel; | ||||
|     bool            m_suspend; | ||||
|     uint64          m_count; | ||||
|     uint64          m_limit; | ||||
|     svector<uint64> m_limits; | ||||
|     ptr_vector<reslimit> m_children; | ||||
| 
 | ||||
|     void set_cancel(unsigned f); | ||||
|     friend class scoped_suspend_rlimit; | ||||
| 
 | ||||
| public: | ||||
|     reslimit(); | ||||
|  | @ -42,7 +44,7 @@ public: | |||
|     uint64 count() const; | ||||
| 
 | ||||
| 
 | ||||
|     bool get_cancel_flag() const { return m_cancel > 0; } | ||||
|     bool get_cancel_flag() const { return m_cancel > 0 && !m_suspend; } | ||||
|     char const* get_cancel_msg() const; | ||||
|     void cancel(); | ||||
|     void reset_cancel(); | ||||
|  | @ -61,6 +63,17 @@ public: | |||
| 
 | ||||
| }; | ||||
| 
 | ||||
| class scoped_suspend_rlimit { | ||||
|     reslimit & m_limit; | ||||
| public: | ||||
|     scoped_suspend_rlimit(reslimit& r): m_limit(r) { | ||||
|         r.m_suspend = true; | ||||
|     } | ||||
|     ~scoped_suspend_rlimit() { | ||||
|         m_limit.m_suspend = false; | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
| struct scoped_limits { | ||||
|     reslimit&  m_limit; | ||||
|     unsigned   m_sz; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue