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

Update version, and remove race condition #811

Merged

Conversation

keyboardDrummer
Copy link
Collaborator

ClearLocalSMTOptions() was called after the checker was released, which leads to a race condition because a new thread may already be using the checker's options while they're still being cleared. Here's an example: https://github.com/dafny-lang/dafny/actions/runs/6930078076/job/18849083894?pr=4773

This PR reduces statefulness of the code, since it no longer clears and reparses SMTLibProcessTheoremProver.options. Instead it has a field IEnumerable<OptionValue> additionalSmtOptions that can be used to tweak SmtOptions between runs.

Copy link
Collaborator

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. I was considering separating the options into two sets even before you noticed this issue, and the concurrency problem is an even stronger reason to go that way.

@keyboardDrummer keyboardDrummer merged commit 7d4d20d into boogie-org:master Nov 20, 2023
4 checks passed
@keyboardDrummer keyboardDrummer deleted the removeRaceConditions branch November 20, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants