mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Merge pull request #1197 from nakengelhardt/handle-setrlimit-fail
smt: handle failure of setrlimit syscall
This commit is contained in:
		
						commit
						bf8bb54c1a
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -43,7 +43,11 @@ if os.name == "posix":
 | 
			
		|||
        if current_rlimit_stack[1] != resource.RLIM_INFINITY:
 | 
			
		||||
            smtio_stacksize = min(smtio_stacksize, current_rlimit_stack[1])
 | 
			
		||||
        if current_rlimit_stack[0] < smtio_stacksize:
 | 
			
		||||
            resource.setrlimit(resource.RLIMIT_STACK, (smtio_stacksize, current_rlimit_stack[1]))
 | 
			
		||||
            try:
 | 
			
		||||
                resource.setrlimit(resource.RLIMIT_STACK, (smtio_stacksize, current_rlimit_stack[1]))
 | 
			
		||||
            except ValueError:
 | 
			
		||||
                # couldn't get more stack, just run with what we have
 | 
			
		||||
                pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# currently running solvers (so we can kill them)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue