forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Offset computation can handle zero-sized objects
Although any access would result in an out-of-bounds access (within the program being verified), it's perfectly fine to perform offset computation.
- Loading branch information
1 parent
95097a8
commit 6b09359
Showing
6 changed files
with
49 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
struct B | ||
{ | ||
} b[1]; | ||
struct c | ||
{ | ||
void *d; | ||
} e = {b}; | ||
struct | ||
{ | ||
struct c f; | ||
} * g; | ||
int main() | ||
{ | ||
g->f; | ||
} |
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,13 @@ | ||
CORE broken-smt-backend | ||
main.c | ||
--pointer-check | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring | ||
Invariant check failed | ||
-- | ||
Taking the address of an empty struct resulted in an invariant failure in | ||
address-of flattening. This test was generated using C-Reduce plus some further | ||
manual simplification. |
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,13 @@ | ||
#include <string.h> | ||
|
||
struct a | ||
{ | ||
} b() | ||
{ | ||
struct a *c; | ||
memcpy(c + 2, c, 1); | ||
} | ||
int main() | ||
{ | ||
b(); | ||
} |
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
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