Skip to content
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

Support for thread-local variables / pthread_getspecific & pthread_setspecific #876

Open
michael-schwarz opened this issue Nov 1, 2022 · 3 comments

Comments

@michael-schwarz
Copy link
Member

The notion of C11 thread-local variables seems to map onto pthread_getspecific & pthread_setspecific. So when adding support for C11, support for this should be added to.

@sim642
Copy link
Member

sim642 commented Nov 23, 2022

Besides C11's thread-local specifier there is also GCC's __thread that we found with @vesalvojdani in silver searcher. It should be very easy to just ignore races on thread-local things.

@sim642 sim642 changed the title Support for C11 thread-local variables / pthread_getspecific & pthread_setspecific Support for thread-local variables / pthread_getspecific & pthread_setspecific Nov 23, 2022
@michael-schwarz
Copy link
Member Author

I think the good first issue applies mostly to not reporting races for these variables, the support to privatize the values is a bit trickier - one has to think a bit what happens when thread ids are non-unique (it would seem like that should also work, but some thought is needed here).

@sim642
Copy link
Member

sim642 commented Jun 2, 2023

#1071 handles the race checking of __thread, but there's still C11's _Thread_local for which the same could apply. It probably requires changes in CIL as well: goblint/cil#13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants