Skip to content

Commit b03d870

Browse files
authored
Merge branch 'diffblue:develop' into goto-synthesizer
2 parents d89f513 + 345f4bf commit b03d870

File tree

289 files changed

+4229
-1708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+4229
-1708
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ cprover_default_properties(
216216
cbmc
217217
cbmc-lib
218218
cpp
219+
cprover-api-cpp
219220
cprover
220221
cprover-lib
221222
crangler

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
/jbmc/src/java_bytecode/ @romainbrenguier @peterschrammel
4545
/src/analyses/ @martin-cs @peterschrammel @chris-ryder
4646
/src/pointer-analysis/ @martin-cs @peterschrammel @chris-ryder
47-
47+
/src/libcprover-cpp @NlightNFotis @thomasspriggs @esteffin @TGWDB @peterschrammel
4848

4949
# These files change frequently and changes are medium-risk
5050

regression/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ add_subdirectory(goto-interpreter)
8585
add_subdirectory(cbmc-sequentialization)
8686
add_subdirectory(cpp-linter)
8787
add_subdirectory(catch-framework)
88+
add_subdirectory(libcprover-cpp)
8889

8990
if(WITH_MEMORY_ANALYZER)
9091
add_subdirectory(snapshot-harness)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
static int foo __attribute__((used)) = 42;
2+
3+
int main()
4+
{
5+
return 0;
6+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
struct bar
2+
{
3+
char *ptr;
4+
};
5+
6+
static struct bar foo __attribute__((used))
7+
__attribute__((__section__(".ref.data")));
8+
9+
static struct bar foo __attribute__((used))
10+
__attribute__((__section__(".ref.data"))) = {0};
11+
12+
void use_foo()
13+
{
14+
__CPROVER_assert(foo.ptr == 0, "null");
15+
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CORE
1+
CORE gcc-only
22
main.c
3-
--floatbv
3+
other.c
44
^EXIT=0$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
76
--
87
^warning: ignoring
8+
^CONVERSION ERROR$

regression/cbmc-concurrency/thread_chain_cbmc1/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
typedef unsigned long thread_id_t;
1919

2020
// Internal unbounded array indexed by local thread identifiers
21-
extern __CPROVER_bool __CPROVER_threads_exited[];
21+
__CPROVER_bool __CPROVER_threads_exited[__CPROVER_constant_infinity_uint];
2222

2323
// A thread_chain is like a chain of threads `f, g, ...` where `f`
2424
// must terminate before `g` can start to run, and so forth.

regression/cbmc-concurrency/thread_chain_cbmc2/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
typedef unsigned long thread_id_t;
1919

2020
// Internal unbounded array indexed by local thread identifiers
21-
extern __CPROVER_bool __CPROVER_threads_exited[];
21+
__CPROVER_bool __CPROVER_threads_exited[__CPROVER_constant_infinity_uint];
2222

2323
// A thread_chain is like a chain of threads `f, g, ...` where `f`
2424
// must terminate before `g` can start to run, and so forth.

regression/cbmc-incr-smt2/pointers-conversions/byte_extract_issue.c renamed to regression/cbmc-incr-smt2/pointers-conversions/byte_extract.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int main()
66
uint32_t input;
77
uint32_t original = input;
88
uint8_t *ptr = (uint8_t *)(&input);
9-
assert(*ptr == 0); // falsifiable
9+
assert(*ptr != 42); // falsifiable
1010
*ptr = ~(*ptr);
1111
assert(input != original); // valid
1212
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CORE
2+
byte_extract.c
3+
--trace
4+
Running incremental SMT2 solving via
5+
Building error trace
6+
\[main\.assertion\.\d+\] line \d+ assertion \*ptr != 42: FAILURE
7+
\[main\.assertion\.\d+\] line \d+ assertion input != original: SUCCESS
8+
input=42ul? \(00000000 00000000 00000000 00101010\)
9+
original=42ul? \(00000000 00000000 00000000 00101010\)
10+
Violated property:
11+
file byte_extract.c function main line \d+ thread \d+
12+
assertion \*ptr != 42
13+
^EXIT=10$
14+
^SIGNAL=0$
15+
--
16+
Reached unimplemented Generation of SMT formula for byte extract expression: byte_extract_little_endian
17+
--
18+
This test is here to document our lack of support for byte_extract_little_endian
19+
in the pointers support for the new SMT backend.

0 commit comments

Comments
 (0)