-
Notifications
You must be signed in to change notification settings - Fork 63
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
Unsoundness for LLVM functions that return non-fresh pointers #641
Comments
Here's another variation, using addresses of globals instead of pointers from input arguments. Here's the C code:
and the saw-script, which again proves that
|
The situation is a bit different if the global is declared
But in this case, verifying such a spec is not actually a problem, as our LLVM memory model explicitly allows immutable regions to alias each other and forbids comparing const pointers. So you can't actually do anything unsound with an override like this one. |
This test succeeds, but it should actually fail. When issue #641 is fixed, the test will need to be modified to indicate an expected failure.
This test succeeds, but it should actually fail. When issue #641 is fixed, the test will need to be modified to indicate an expected failure.
Fix soundness bug related to disjointness checking (#641)
This is a similar bug to #640, but without using
NULL
.Here's the C code:
And here's the saw-script, which can prove both that
bar
always returns0
and thatbar
always returns 1:The problem is that the verification of
foo
should fail, as the spec says that the return value offoo
should be a freshly-created pointer, while it has actually copied the pointer from an input argument. To be sound, we need to check that supposedly-fresh pointers are actually disjoint from all other pointers in scope.The text was updated successfully, but these errors were encountered: