Skip to content

Conversation

@michael-schwarz
Copy link
Member

Our analysis currently is sound here, as the second argument to the function is considered escaped, and treated flow-insensitively from there on. Also, it is invalidated when sem.unknown_function.invalidate.globals is set.

Any later writes thus do not lead to the value being changed back from T and thus all writes through the pointer obtained back from pthread_getspecific are also accounted for.

This adds an assert that fails if the code makes use of pthread_setspecific and ``sem.unknown_function.invalidate.globals` is disabled, leading to unsound results.

This a temporary measure before #876 is attacked.

…t if program contains `pthread_setspecific`
@michael-schwarz michael-schwarz changed the title Add sanity check that sem.unknown_function.invalidate.globals is set if program contains pthread_setspecific First approximation of pthread_setspecific by escaping things reachable from the argument and invalidating all globals Nov 2, 2022
@michael-schwarz michael-schwarz merged commit 25e6c34 into master Nov 2, 2022
@michael-schwarz michael-schwarz deleted the pthread_setspecific_sanity branch November 2, 2022 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants