Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

Reachable error in pthread-ext/41_FreeBSD_abd_kbd_sliced #1300

Open
schuessf opened this issue Jun 7, 2021 · 0 comments
Open

Reachable error in pthread-ext/41_FreeBSD_abd_kbd_sliced #1300

schuessf opened this issue Jun 7, 2021 · 0 comments
Labels
C Task in language C issue with benchmark

Comments

@schuessf
Copy link

schuessf commented Jun 7, 2021

The program pthread-ext/41_FreeBSD_abd_kbd_sliced is labeled as true. However there should be a feasible counterexample trace (which Ultimate Automizer also found).
One thread can simply call akbd_read_char(1) and therefore execute the trace:

__VERIFIER_atomic_acquire();
COND = 0;
__VERIFIER_atomic_release();
assume_abort_if_not(COND);
__VERIFIER_atomic_acquire();
if(!(COND)) { goto ERROR; }

For this error trace to be feasible we need to set COND to 1 before the assume_abort_if_not and back to 0 after it. This can be achieved, if other threads call adb_kbd_receive_packet() and akbd_read_char(1) respectivitely (since the mutex is not locked there).
Therefore it seems that this example should be labeled as false (unreach-call).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C Task in language C issue with benchmark
Development

No branches or pull requests

2 participants