-
Notifications
You must be signed in to change notification settings - Fork 142
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
Dataflow facts vanish after function call using PropagateOnto strategy #679
Comments
Hi @yuffon, yes that sounds like a bug. Can you provide the analysis code, such that we can debug it? |
My project relies on other components. I am constructing a simple case and will report it later. |
Hi @fabianbs96, I am isolating my typestate analysis from other parts of my project so that it can run independently. My flow functions are designed as follows. Normal Flow Function: Call flow function: call to ret flow functions: return flow functions: Currently, these flow functions works well for Propagate Over strategy. However, if I change the call to ret flow function as follows: call to ret flow functions: In the above example, the dataflow results after calling
These results conform to flow functions. |
Hi @yuffon, thatks for the details. Based on your description, I have some comments on the handling of function calls (not sure whether you already handle it like this):
From your description, I cannot see whether you do the parameter mapping correctly in your flow functions. Otherwise your approach sounds reasonable |
Thanks a lot for your detailed comments. I used a simple and lazy implementation. I will revise it and check again. |
I have an issue with the PropagateOnto strategy.
If I use the default PropagateOver strategy, my typestate code works well.
But when using PropagateOnto strategy, some dataflow facts vanish after invoking function.
Basically, I use an finite state machine describing pointers cannot be used after free.
The analyzed code is
The IR file is
The dumped results of using PropagateOver strategy is
Everything is OK up to now.
But with the propagateOnto strategy, the dumped results are
As shown above, the last two instructions after calling the function have no dataflow facts.
It seems that dataflow facts do not come out from the invoked function.
In fact, I use identity flow function for all return edges.
Besides, the default PropagateOver strategy works well, so it may not be the fault of flow functions.
The text was updated successfully, but these errors were encountered: