You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To allow the above command to execute successfully, I added the following line before line 110 (if(is_shared && lhs.type().id() == ID_pointer && !allow_pointer_unsoundness)) in src/goto-symex/goto_symex_state.cpp:
The two assertions in multithreaded_assume.c have been proven to hold.
What happened instead:
CBMC reported that the two assertions were violated, with the output below:
** Results:
<builtin-library-__spawned_thread>function__spawned_thread
[__spawned_thread.pointer_dereference.1] line 41 dereferenced functionpointer must be one of [thread_function2, thread_function1]: SUCCESS
examples/multithreaded_assume.c functionthread_function1
[thread_function1.assertion.1] line 13 assertion x == 42: FAILURE
examples/multithreaded_assume.c functionthread_function2
[thread_function2.assertion.1] line 23 assertion x == 42: FAILURE
** 2 of 3 failed (3 iterations)
VERIFICATION FAILED
I used the option --trace to identify the counterexample causing the violation:
The trace that violates the assertion in thread_function1 proceeds as follows (with key statements in the program labeled s1,s2,...,s6):
s1 is executed, assigning x the value 42
s2 is executed and passes the assumption
context switches to thread_function2
s4 is executed, assigning x the value 40
s5 is executed but fails the assumption
context switches to thread_function1
s3 is executed and fails the assertion
The unexpected behavior is that execution continues even after an assumption is voilated (step 5 in the trace). Here, __VERIFIER_assume appears to act like a thread-local assume, allowing other threads to proceed even when an fails in one thread. However, I expected __VERIFIER_assume to function as a global assume, where execution would block for all threads upon any assumption failure.
Thank you very much for your assistance!
The text was updated successfully, but these errors were encountered:
CBMC version: 6.3.1 (cbmc-6.3.1-10-g83922b2f54-dirty)
Operating system: macOS 15.0
Exact command line resulting in the issue:
To allow the above command to execute successfully, I added the following line before line 110 (
if(is_shared && lhs.type().id() == ID_pointer && !allow_pointer_unsoundness)
) insrc/goto-symex/goto_symex_state.cpp
:with
multithreaded_assume.c
:What behaviour did you expect:
The two assertions in
multithreaded_assume.c
have been proven to hold.What happened instead:
CBMC reported that the two assertions were violated, with the output below:
I used the option
--trace
to identify the counterexample causing the violation:The trace that violates the assertion in
thread_function1
proceeds as follows (with key statements in the program labeled s1,s2,...,s6):x
the value 42thread_function2
x
the value 40thread_function1
The unexpected behavior is that execution continues even after an assumption is voilated (step 5 in the trace). Here,
__VERIFIER_assume
appears to act like a thread-local assume, allowing other threads to proceed even when an fails in one thread. However, I expected__VERIFIER_assume
to function as a global assume, where execution would block for all threads upon any assumption failure.Thank you very much for your assistance!
The text was updated successfully, but these errors were encountered: