LeventErkok / sbv

SMT Based Verification in Haskell. Express properties about Haskell programs and automatically prove them using SMT solvers.
https://github.com/LeventErkok/sbv
Other
239 stars 33 forks source link

Try to fix the zombie solver processes, don't hide the exceptions #695

Closed lsrcz closed 3 months ago

lsrcz commented 3 months ago

This pull request is another attempt to fix the zombie solver processes mentioned in #477. Previously, a pull request has been sent as #691, and has been reverted in #693, as it introduced test failures where the error messages for the exceptions are hidden by a generic failure message, as discussed in #694.

The reason why that happened is that finally swallows the exception, and the queryTerminate being called in the finally clause throws the generic failure message.

In addition to the fix in #691, this pull request tunes the queryTerminate function with an additional Maybe SomeException argument. The abnormal termination path will now pass the exceptions to the queryTerminate and let the function forward the exception.

There are hard-coded paths for the solvers in the golden files, and the test suite requires all kinds of solvers to be installed, so I only ensured that

Please run the full test suite in your environment to ensure that it works.