-
Notifications
You must be signed in to change notification settings - Fork 135
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
Fix SVF integration #412
base: master
Are you sure you want to change the base?
Fix SVF integration #412
Conversation
765b38d
to
a0d0481
Compare
@mchalupa This is the current state of the few failing tests:
|
The failing tests show that the points-to sets computed with
with and without |
Might be unrelated but $ build/tools/llvm-pta-dump funcptr12.ll
Pointer Subgraph is broken (right after building)!
Invalid number of edges:
PSNodeType::STORE with ID 7
- operands: [5 PSNodeType::FUNCTION, 6 PSNodeType::CONSTANT]
(Non-entry node has no predecessors)
Invalid number of edges:
PSNodeType::STORE with ID 10
- operands: [8 PSNodeType::FUNCTION, 9 PSNodeType::CONSTANT]
(Non-entry node has no predecessors)
Unreachable node:
PSNodeType::STORE with ID 7
- operands: [5 PSNodeType::FUNCTION, 6 PSNodeType::CONSTANT]
Unreachable node:
PSNodeType::STORE with ID 10
- operands: [8 PSNodeType::FUNCTION, 9 PSNodeType::CONSTANT]
INFO: Pointer analysis took 0 sec 7 ms
... |
|
Yes, the slicer should say that |
From the points-to sets provided by SVF, we can find out that the pointer points to some dummy object, but, SVF does not propagate the information about what instruction allocated this dummy memory object: https://github.com/SVF-tools/SVF/blob/master/lib/WPA/Andersen.cpp#L644 |
I'm not sure what we can do here. We can always use our lazy-callgraph which overapproximates the called functions, but for that it would be good to detect that the call graph (or just the points-to set of the function pointer) is incomplete. That is, for any variadic function, we would need to check if some of its actual arguments can point to a function and for such functions we use information from our call graph (possibly filtered with the information about actual arguments). |
If `buildSymbolTableInfo` is not called on the built `SVFModule`, `PAGBuilder` tries to dereference a `nullptr` which results in a segmentation violation. Related UBSAN report: SVF/lib/SVF-FE/ICFGBuilder.cpp:43:59: runtime error: member call on null pointer of type 'struct SVFModule' 0 0x55ce7156a1b0 in SVF::ICFGBuilder::build(SVF::SVFModule*) SVF/lib/SVF-FE/ICFGBuilder.cpp:43 1 0x55ce7136cbe5 in SVF::PAG::PAG(bool) SVF/lib/Graphs/PAG.cpp:367 2 0x55ce7120a576 in SVF::PAG::getPAG(bool) (dg/build/tools/llvm-slicer+0xc73576) 3 0x55ce7120a9d6 in SVF::PAGBuilder::PAGBuilder() (dg/build/tools/llvm-slicer+0xc739d6) 4 0x55ce7120f6d8 in dg::SVFPointerAnalysis::run() (dg/build/tools/llvm-slicer+0xc786d8) 5 0x55ce7120ffab in dg::llvmdg::LLVMDependenceGraphBuilder::_runPointerAnalysis() (dg/build/tools/llvm-slicer+0xc78fab) 6 0x55ce71213d56 in dg::llvmdg::LLVMDependenceGraphBuilder::constructCFGOnly() (dg/build/tools/llvm-slicer+0xc7cd56) 7 0x55ce712273ad in Slicer::buildDG(bool) (dg/build/tools/llvm-slicer+0xc903ad) 8 0x55ce711d5ef4 in main dg/tools/llvm-slicer.cpp:248
* Apply relevant clang-tidy suggestions * Fix typos * Simplify some if-else expressions
a0d0481
to
338843b
Compare
Thanks @mchalupa. The |
338843b
to
01c0d7d
Compare
No description provided.