-
Notifications
You must be signed in to change notification settings - Fork 273
Symex wrongly nondets local variable inherited after START_THREAD #1630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure why this loop isn't creating a copy of |
This will be fixed once #2220 is merged - I'll add it as a regression test. |
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Dec 1, 2018
…object With level-2 counters incremented on declaration and non-deterministic initialisation upon allocation, the only remaining sources are pointer dereferencing, where uninitialised objects necessarily refer to invalid objects. This is a cleaner implementation of 369f077. Removing only the code introduced in 369f077 would yield a wrong result for regression/cbmc/Local_out_of_scope3. Fixes: diffblue#1630
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Dec 2, 2018
…object With level-2 counters incremented on declaration and non-deterministic initialisation upon allocation, the only remaining sources are pointer dereferencing, where uninitialised objects necessarily refer to invalid objects. This is a cleaner implementation of 369f077. Removing only the code introduced in 369f077 would yield a wrong result for regression/cbmc/Local_out_of_scope3. Fixes: diffblue#1630
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Dec 6, 2018
…object With level-2 counters incremented on declaration and non-deterministic initialisation upon allocation, the only remaining sources are pointer dereferencing, where uninitialised objects necessarily refer to invalid objects. This is a cleaner implementation of 369f077. Removing only the code introduced in 369f077 would yield a wrong result for regression/cbmc/Local_out_of_scope3. Fixes: diffblue#1630
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Dec 14, 2018
…object With level-2 counters incremented on declaration and non-deterministic initialisation upon allocation, the only remaining sources are pointer dereferencing, where uninitialised objects necessarily refer to invalid objects. This is a cleaner implementation of 369f077. Removing only the code introduced in 369f077 would yield a wrong result for regression/cbmc/Local_out_of_scope3. Fixes: diffblue#1630
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Dec 19, 2018
…object With level-2 counters incremented on declaration and non-deterministic initialisation upon allocation, the only remaining sources are pointer dereferencing, where uninitialised objects necessarily refer to invalid objects. This is a cleaner implementation of 369f077. Removing only the code introduced in 369f077 would yield a wrong result for regression/cbmc/Local_out_of_scope3. It also fixes the problem of extern symbols not having an initial value, and thus being skipped. Fixes: diffblue#1630
tautschnig
added a commit
to tautschnig/cbmc
that referenced
this issue
Dec 19, 2018
…object With level-2 counters incremented on declaration and non-deterministic initialisation upon allocation, the only remaining sources are pointer dereferencing, where uninitialised objects necessarily refer to invalid objects. This is a cleaner implementation of 369f077. Removing only the code introduced in 369f077 would yield a wrong result for regression/cbmc/Local_out_of_scope3. Fixes: diffblue#1630
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When cbmc as in current
develop
is given this program:it finds a violation to the assertion using the following equation:
in which it is possible to see that the copy of variable
loc
in thread 1 that is being assigned to the thread-local variablethlocal
is a free variable in the equation (loc!1@0#0
), which therefore can be assigned any value, thus triggering the assertion violation.Now, an almost identical code is used in the internal model of
pthread_create
insrc/ansi-c/library
to compute a thread id right before a new thread started, and pass it to the thread. There, reading a local variable (loc
here,this_thread_id
there) from the "host" function (test3
here,pthread_create
there) rightly transfers the value from the host function (123
here) to the thread.@tautschnig, could you explain why this mechanism works correctly in
pthread_create
but not here?The text was updated successfully, but these errors were encountered: