mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	let me guess, ASAN doesn't like 0-byte memcpy
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									90415a18d3
								
							
						
					
					
						commit
						c7dc420b3b
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -46,8 +46,12 @@ namespace nlsat {
 | 
			
		|||
        lazy_justification(unsigned nl, literal const * lits, unsigned nc, nlsat::clause * const* clss):
 | 
			
		||||
            m_num_literals(nl),
 | 
			
		||||
            m_num_clauses(nc) {
 | 
			
		||||
            memcpy(m_data + 0,                  clss, sizeof(nlsat::clause const*)*nc);
 | 
			
		||||
            memcpy(m_data + sizeof(nlsat::clause*)*nc, lits, sizeof(literal)*nl);
 | 
			
		||||
            if (nc > 0) {
 | 
			
		||||
                memcpy(m_data + 0,                         clss, sizeof(nlsat::clause*)*nc);
 | 
			
		||||
            }
 | 
			
		||||
            if (nl > 0) {
 | 
			
		||||
                memcpy(m_data + sizeof(nlsat::clause*)*nc, lits, sizeof(literal)*nl);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        unsigned num_lits() const { return m_num_literals; }
 | 
			
		||||
        literal lit(unsigned i) const { SASSERT(i < num_lits()); return lits()[i]; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue