Skip to content

Commit ec3010f

Browse files
authored
Merge pull request diffblue#1994 from tautschnig/concurrency-soundness
[SV-COMP'18 5/19] Abort concurrency encoding in possibly unsound cases
2 parents 1a9850a + 26b13ae commit ec3010f

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

regression/cbmc-concurrency/thread_chain_posix2/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
main.c
33
-D_ENABLE_CHAIN_ --unwind 2
44
^EXIT=0$

regression/cbmc-concurrency/thread_chain_posix3/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
KNOWNBUG
22
main.c
33
-D_ENABLE_CHAIN_ -D_SANITY_CHECK_ --unwind 2
44
^EXIT=10$

regression/cbmc/realloc3/test.desc

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
CORE
22
main.c
33

4-
^EXIT=0$
4+
^EXIT=6$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
6+
pointer handling for concurrency is unsound
77
--
88
^warning: ignoring
9+
--
10+
The test uses "__CPROVER_ASYNC_1:" and the async-called function foo does
11+
pointer operations over allocated memory - which is not handled in a sound way
12+
in CBMC.

src/goto-symex/goto_symex_state.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ void goto_symex_statet::assignment(
342342
assert_l2_renaming(lhs);
343343
assert_l2_renaming(rhs);
344344

345+
// see #305 on GitHub for a simple example and possible discussion
346+
if(is_shared && lhs.type().id() == ID_pointer)
347+
throw "pointer handling for concurrency is unsound";
348+
345349
// for value propagation -- the RHS is L2
346350

347351
if(!is_shared && record_value && constant_propagation(rhs))

0 commit comments

Comments
 (0)