This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Removed duplicate benchmark"
This reverts commit 9182d44.
- Loading branch information
1 parent
a984fe7
commit 85a695e
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Date: 2013-07-13 | ||
* Author: leike@informatik.uni-freiburg.de | ||
* | ||
* Simple test case for the lexicographic template. | ||
* Has the lexicographic ranking function | ||
* f(x, y) = <x, y> | ||
* | ||
*/ | ||
|
||
typedef enum {false, true} bool; | ||
|
||
extern int __VERIFIER_nondet_int(void); | ||
|
||
int main() { | ||
int x, y; | ||
while (x >= 0 && y >= 0) { | ||
y = y - 1; | ||
if (y < 0) { | ||
x = x - 1; | ||
y = __VERIFIER_nondet_int(); | ||
} | ||
} | ||
return 0; | ||
} |
85a695e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to category HeapMemSafety in commit bf78725 and
removed from check.py in commit 123c12f.
Please review @PhilippWendler
85a695e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not an expert in this category, somebody else should do this. Not sure if access to uninitialized int variables counts as
_false-valid-deref
.85a695e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Citing the rules "All pointer dereferences are valid (counterexample: invalid dereference). More precisely: There exists no finite execution of the program on which an invalid pointer dereference occurs."
No, accessing an uninitialized int could hardly be considered false-valid-deref.
It is my understanding the the users of LLVM pushed most strongly for ruling out all uninitialized variables, because the front-end would possibly remove or auto-initialize them. Consequently they would never even get to see this benchmark as-is, and couldn't properly reason about it. And we could find all the cases in the repository by looking at the compiler warnings in our checks - we don't really need to run model checkers...
85a695e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then the file name is wrong and should be fixed first.
Perhaps to include _false-no-undef-var or such.
85a695e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now #262 for visibility.