* Add missing files to dist.
* Fix GC and substitute bugs related to self-references. Add a regression test.
This commit is contained in:
		
							parent
							
								
									32fa82a56a
								
							
						
					
					
						commit
						06b4424286
					
				
					 4 changed files with 14 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1329,7 +1329,8 @@ void SubstitutionGoal::init()
 | 
			
		|||
 | 
			
		||||
    for (PathSet::iterator i = references.begin();
 | 
			
		||||
         i != references.end(); ++i)
 | 
			
		||||
        addWaitee(worker.makeSubstitutionGoal(*i));
 | 
			
		||||
        if (*i != storePath) /* ignore self-references */
 | 
			
		||||
            addWaitee(worker.makeSubstitutionGoal(*i));
 | 
			
		||||
 | 
			
		||||
    if (waitees.empty()) /* to prevent hang (no wake-up event) */
 | 
			
		||||
        referencesValid();
 | 
			
		||||
| 
						 | 
				
			
			@ -1347,7 +1348,8 @@ void SubstitutionGoal::referencesValid()
 | 
			
		|||
 | 
			
		||||
    for (PathSet::iterator i = references.begin();
 | 
			
		||||
         i != references.end(); ++i)
 | 
			
		||||
        assert(isValidPath(*i));
 | 
			
		||||
        if (*i != storePath) /* ignore self-references */
 | 
			
		||||
            assert(isValidPath(*i));
 | 
			
		||||
    
 | 
			
		||||
    tryNext();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue