-
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
Possible error in function resultatinLLVMSSA() #629
Comments
Hi @Luweicai, to get your question right: Are you saying that PhASAR does not give any results at a call-site or that PhASAR should not give results at a call statement? The Due to the structure of LLVM IR a call statement (and in fact any other non-void instruction) can be seen as two parts: the right side of the The regular Can you please further explain, why the call instruction has an issue? Maybe an example could be helpful. |
Hi @fabianbs96 , thank you for your reply. I agree with your description about What I would like to say is that, there seems to be a slight mistake in the implementation of The different functionality of the Here is the example:
Assume at the begin the Let's see what happens when we want to query whether Becasue the implementation of PHASAR, |
Hi @Luweicai, I am not sure whether I understand your problem correctly. Given your example, %1 is generated at %1... as its statement effect, which means that the fact appears at %2... . %2 should hold at both the third and fourth statement. Anyway, looking into the implementation of Thank you for reporting this, we'll look into it. |
Hi @MMory. Let me show more details about the origin of this problem. Here is the ''process intra propagate'' of the IFDS analysis (extract from IDESolver.h). I omit the trivial part and only illustrate the problem involved part.
From the code that we know a fact generated at pos There is no mistake here, this is how the classical IFDS algorithm is written. In this scenario, the taint result for one position (let's call it Instruction But if one just want to know that the whether the left hand value of
It is corrent in most cases. However, if the At this point, I began to doubt whether there is an issue with my implementation of the inter-analysis section. Because the results of my analysis are always look like (print by the for test case(
the result is:
|
Hi @fabianbs96. It works. Thank you. |
The resultatinLLVMSSA() helps to deal with the problem that new generated fact will only vaild after the current instrcuction. For example, the load instruction, if %i is hold, the fact %0 will hold after the load instruction. The resultatinLLVMSSA() aims to solve this problem by querying the result at the next instruction.
%0 = load i32, i32* %i, align 4;
However, it seems not consider the problem that if the next insturction is a call statement. Due to the underlying theory (and respective implementation) not fact at call statement holds and will only holds at the corresponding return site, i.e. the statement after the call statement.
The text was updated successfully, but these errors were encountered: