pthread_cond_wait may return spuriously#4271
Merged
tautschnig merged 2 commits intodiffblue:developfrom Feb 25, 2019
Merged
Conversation
13 tasks
Contributor
|
Is there a test case for this? |
239f996 to
102ff7a
Compare
Collaborator
Author
|
Test added. |
kroening
approved these changes
Feb 25, 2019
102ff7a to
38720d9
Compare
allredj
reviewed
Feb 25, 2019
Contributor
allredj
left a comment
There was a problem hiding this comment.
🚫
This PR failed Diffblue compatibility checks (cbmc commit: 38720d9).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102156901
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
These will never work on Windows, which doesn't have POSIX threads.
The man page states: "In general, whenever a condition wait returns, the thread has to re-evaluate the predicate associated with the condition wait to determine whether it can safely proceed, should wait again, or should declare a timeout. A return from the wait does not imply that the associated predicate is either true or false." The regression test is based on pthread-divine/condvar_spurious_wakeup_false-unreach-call.c from SV-COMP.
38720d9 to
4c6a9fc
Compare
allredj
reviewed
Feb 25, 2019
Contributor
allredj
left a comment
There was a problem hiding this comment.
✔️
Passed Diffblue compatibility checks (cbmc commit: 4c6a9fc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102207363
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The man page states: "In general, whenever a condition wait returns, the thread
has to re-evaluate the predicate associated with the condition wait to determine
whether it can safely proceed, should wait again, or should declare a timeout. A
return from the wait does not imply that the associated predicate is either true
or false."