Fix var_eq analysis not invalidating escaped variable #142
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.
This is the source of unsoundness for SV-COMP goblint-regression/28-race_reach_45-escape_racing.yml (issue #141), which is actually from our regression suite. There it doesn't fail because it's run without
var_eq.var_eqkeeps the equalityi == 0afteriescapes through the 4th argument ofpthread_create. ChangingLibraryFunctionsto invalidate that argument also fixes this test, but breaks 05/17. Because of this I'm not sure if this is the right fix or maybe there's something better to do.I suspect not because our invalidation and
var_eqare quite ignorant about passing pointers. In one case&iis passed, in the other onlyp. The thing is that the argument (which is a pointer) itself wouldn't be changed by suchpthread_createbut only whatever the argument points to.Another oddity is that
basealso doesn't invalidateiin that example. But only later when it is read (for the assertion), the global invariant is used instead because according toescapeit has escaped.