Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solver timeout inconsistency #135

Open
paulmar opened this issue Jul 8, 2014 · 5 comments
Open

Solver timeout inconsistency #135

paulmar opened this issue Jul 8, 2014 · 5 comments
Labels
Feature Request New feature that should be implemented in KLEE

Comments

@paulmar
Copy link
Contributor

paulmar commented Jul 8, 2014

Right now the --max-solver-time option accepts a double argument. However, that argument is truncated to an integer before calling the solver because the timer is enforced by means of alarm(unsigned seconds).
This might cause confusion and also makes the minimum solver timeout 1 second.

Confusion can be avoided by making the --max-solver-time take an integer or we can be more flexible by using setitimer.

@ccadar
Copy link
Contributor

ccadar commented Jul 8, 2014

Good catch. We should definitely implement one of these solutions. I guess the setitimer is indeed more flexible. Do you want to write a patch implementing one of them?

@ccadar ccadar added the Feature Request New feature that should be implemented in KLEE label Sep 13, 2014
@ccadar
Copy link
Contributor

ccadar commented Sep 3, 2020

@251 I believe this very old issue was solved by the new time API you contributed a couple of years back. This being said, I still see a few alarm calls in the codebase. Is this issue still present after your changes?

@251
Copy link
Contributor

251 commented Sep 4, 2020

@ccadar Yes, upstream still uses alarm and is limited to seconds. MoKlee has a sigtimedwait implementation though - shall I create a PR?

@ccadar
Copy link
Contributor

ccadar commented Sep 4, 2020

@251 thanks. Would sigtimedwait work on macOS and FreeBSD? Maybe you can use sigwait instead?

@251
Copy link
Contributor

251 commented Sep 5, 2020

@ccadar sigtimedwait is part of POSIX and sigwait is implemented on top of sigtimedwait in Linux acc. to the man page. Should work for all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature that should be implemented in KLEE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants