Closed DongjieHe closed 2 years ago
That makes a lot of sense to me. I'll change the implementation accordingly. Thanks a lot!
Hi Steven,
The patch did not solve the problem fully. There still exist Applications that FlowDroid produces unstable results. And I am struggling with this issue. I have a few questions about the interaction of the forward and backward solvers. I wish your answers can help me find the solutions quickly.
injectCallingContext
method. Can you give a few words here to help me better understand this interaction? Thanks in advance.
Dongjie He
Dear FlowDroid developers,
I am recently fixing the bug that causes Flowdroid to produce unstable results. I find that the forward solver may propagate both the active and inactive version of a path edge. For example, let <s, d1> -> <n, d2> be an active path edge and <s, d1> -> <n, -d2> be its inactive version.
The process order of the two edges may result in different sizes of the
jumpFunctions
and differentpropagationCount
. Suppose the solver processes the active edge first, then when handling the inactive version, the existing implementation will not propagate the inactive edge anymore due to its lines 652-655.However, if the solver processes the inactive edge first, then when handling the active path, the solver will still propagate the edge.
To avoid such redundant propagation, I suggest always saving the active version of a path edge into the
jumpFunctions
.Our patching code is given below. It replaces the existing implementation of the
propagate(D sourceVal, N target, D targetVal, N relatedCallSite, boolean isUnbalancedReturn)
with the following code:This patch works for two reasons: (1) all path edges handled by the backward solver are inactive. Recording their active versions does not affect the results. (2) the forward solver is only required to propagate a path edge or its inactive/active version exclusively once.
Please help to check the correctness of the above code. If it is correct, please help to merge it into the
develop
branch.Thanks very much.
Dongjie He