diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-07-15 19:42:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 19:42:11 +0200 |
commit | bf8bb54c1a94a8106f99e9a5aedb95b32d76bb9a (patch) | |
tree | 54f51956563d8d319cfe02c3ca4b3372c28d6a1e /backends/smt2/smtio.py | |
parent | a97d30d2f88d2f7a41abf8b913bbc017b60d8c7d (diff) | |
parent | ab4b9e8db481cd24b61cc0dc14bb5bf74d08006d (diff) | |
download | yosys-bf8bb54c1a94a8106f99e9a5aedb95b32d76bb9a.tar.gz yosys-bf8bb54c1a94a8106f99e9a5aedb95b32d76bb9a.tar.bz2 yosys-bf8bb54c1a94a8106f99e9a5aedb95b32d76bb9a.zip |
Merge pull request #1197 from nakengelhardt/handle-setrlimit-fail
smt: handle failure of setrlimit syscall
Diffstat (limited to 'backends/smt2/smtio.py')
-rw-r--r-- | backends/smt2/smtio.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py index ae7968a1b..bac68ac70 100644 --- a/backends/smt2/smtio.py +++ b/backends/smt2/smtio.py @@ -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) |