-
Notifications
You must be signed in to change notification settings - Fork 440
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
Handling inttoptr in SVFIR #1370
Comments
This is a very good question. Previously, we treat int2ptr as sourcing from null or blackhole due to pointer analysis, which does not support analysing values across integers and pointers. It looks to me that a COPY PAG edge is not a good option for the casting. We may need to define a special edge on PAG to maintain int2ptr if we would like it to be reflected on the graph. |
I see. Do you also recommend to change the edge type for the ptrtoint as well (currently a copy edge)? Let me know your thoughts on the design/implementation for this change. I can try to take a shot at it. |
The int2ptr has been added to PAG and this is the patch to fix it. @karthikbhata97 |
Yes, please try to submit a patch. I think the reason might because the instruction was not added to the PAG |
Hi,
Thanks for building this valuable tool.
I am interested in how a pointer and the value referenced by it flows through a program. So I am using a SVFIR to track Load/Store/Copy of a pointer. Here is the program I am analyzing
I am analyzing the arguments to test function, and trying to log all the load instructions on the pointer passed to test. I am using PAG/SVFIR to walk through the graph. It works well, when pointer is passed.
Here the pointer is passed as an integer with ptrtoint (at 1), which is then type casted with inttoptr (at 2). And PAG has no links between them. (2) is treated as coming from a null.
SVF/svf-llvm/lib/SVFIRBuilder.cpp
Line 397 in dda7fe5
Thanks again for building and maintaining SVF!
The text was updated successfully, but these errors were encountered: