Open ktran opened 4 years ago
May I have a look at your C test case?
Alternatively, you can also test the alias results via a stub function "MAYALIAS(p,q)" in your code when running SVF's analysis.
Please see : https://github.com/SVF-tools/PTABen/blob/master/basic_c_tests/CI-global.c
Thanks for your quick answer! The code is from a bigger benchmark (450.soplex), but the relevant lines are here:
matrix[j] = &theLP->vector(id); // store
nzCount += matrix[j++]->size(); // load of matrix[j]
But unfortunately it's not a small test case, if that is what you wanted. I'll have a look at the MAYALIAS stub, and will get back to you!
Hi!
Thanks for sharing and maintaining such a great project!
I'm trying to use Andersen's analysis (DiffWave) in order to find aliases between pointer operands. Now there are obvious aliases that I cannot be able to detect, and I highly suspect that I'm just using the analysis in a wrong way. I've read related issues and have been debugging but I didn't get to the correct alias info yet, so I figured it might be faster to ask you directly.
This is an excerpt of the piece of code I'm currently analyzing:
The store and the load to %78 should clearly alias, since the store is updating the value that is loaded afterwards. However, I always get NoAlias.
I'm using Andersen in the following way, using it with opt and the -ander flag on my LLVM IR:
I plotted the PAG and it is reflected there that they are linked to each other (see pag here). Looking at their (LPointer, SPointer) points-to-set (given the node ids in the pag) they are completely empty.
What am I doing wrong?
I'm currently using the latest version of SVF on LLVM 8.0 (I made a few syntactical changes to be updated to the latest LLVM, not anything more than that). I saw that the DominanceFrontier is used in some tools, which doesn't exist in the latest LLVM anymore, but I'm only using the PointerAnalysis itself, which shouldn't be affected.
Best,
Kim