-
Notifications
You must be signed in to change notification settings - Fork 76
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
Thread Wrappers #1021
Thread Wrappers #1021
Conversation
We now have an issue with |
Add tests that specifically check that Goblint can't detect two threads as being distinct if unique_thread_id_count is not high enough.
Thanks for the reminder on this ;) I've addressed all the comments (thanks Simmo!) There's one last problem I can't figure out: if the |
When run with EDIT: It appears that the issue is in check whether the created set in |
In the wrapper function analysis' analyzer/src/analyses/wrapperFunctionAnalysis.ml Lines 85 to 87 in 68b2267
analyzer/src/analyses/threadId.ml Lines 100 to 103 in 68b2267
I've changed |
That doesn't seem right indeed because the idea has been that each thread is handled on its own, independent of who created it. Now looking at it, why is |
The spawned thread's ID from I've changed the Alternative Ideamaster...just-max:goblint-analyzer:thread_wrappers_stateful_id Another option is: change |
I see, indeed they keep track of slightly different things. The current solution seems reasonable. It changes the domain and context for threadid analysis, so I wonder if this can have an effect on default performance. Although it shouldn't be too often that the same history thread ID set is created with a different node as the last one. Anyway, conflicts with master still need to be resolved:
|
Conflicts are resolved. Thanks again for the help getting this done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @just-max, it's nice to have this feature in Goblint now!
Extends the concept of
malloc
wrappers to thread creation. Threads receive an ID based on the CFG node of the wrapper function's call, instead of thepthread_create
call, which in the case of a wrapper is always the same node.Closes #664.