Comments (7)
This is likely due to the definition from a rust-specific external API call. Could you dump that pagnode and its llvm or using its toString method ?
from svf.
By setting SVFUtil::outs() in the following points:
inline NodeID getDef(const PAGNode* pagNode) const
{
SVFUtil::outs() << *pagNode << std::endl; // a new statement.
PAGNodeToDefMapTy::const_iterator it = PAGNodeToDefMap.find(pagNode);
assert(it!=PAGNodeToDefMap.end() && "SVFVar does not have a definition??");
return it->second;
}
void VFG::connectDirectVFGEdges()
{
for(iterator it = begin(), eit = end(); it!=eit; ++it)
{
NodeID nodeId = it->first;
VFGNode* node = it->second;
if(StmtVFGNode* stmtNode = SVFUtil::dyn_cast<StmtVFGNode>(node))
{
/// do not handle AddrSVFG node, as it is already the source of a definition
if(SVFUtil::isa<AddrVFGNode>(stmtNode))
continue;
/// for all other cases, like copy/gep/load/ret, connect the RHS pointer to its def
if (stmtNode->getPAGSrcNode()->isConstDataOrAggDataButNotNullPtr() == false){
SVFUtil::outs()<< *stmtNode << "\n"; // a new statement.
addIntraDirectVFEdge(getDef(stmtNode->getPAGSrcNode()), nodeId);
}
....
}
Saber outputted
CopyVFGNode ID: 379 CopyStmt: [Var2036 <-- Var2033]
%s = inttoptr i64 %c_string to ptr, !dbg !136 { "ln": 20, "cl": 21, "fl": "src/main.rs" }
ValVar ID: 2033
%c_string = ptrtoint ptr %_2 to i64, !dbg !134 { "ln": 18, "cl": 33, "fl": "src/main.rs" }
saber: /SVF/svf/include/Graphs/VFG.h:428: SVF::NodeID SVF::VFG::getDef(const SVF::PAGNode*) const: Assertion `it!=PAGNodeToDefMap.end() && "SVFVar does not have a definition??"' failed.
[1] 230733 IOT instruction (core dumped) ../../Debug-build/bin/saber -leak
before the assertion failure.
Note that function str_from_c
, whose returned value is assigned to the variable %_2, was design by me and linked through Rust's FFI support.
from svf.
What is the PAGNode and SVFGNode at the assertion? It looks to me that these nodes are not on the PAG.
from svf.
Sorry, I am not very familiar with the data structures in SVF. If you are referring to the type const SVF::PAGNode
, I believe that
ValVar ID: 2033
%c_string = ptrtoint ptr %_2 to i64, !dbg !134 { "ln": 18, "cl": 33, "fl": "src/main.rs" }
was the one that triggered the assertion failure?
from svf.
Are you using the mainstream SVF, latest version?
Could you try wpa -ander -svfg to see whether the assertion is still there?
from svf.
Thanks! After pulling the latest version, the problem is resolved
from svf.
Sounds good.
from svf.
Related Issues (20)
- Questions about overflow detection HOT 2
- An error occurred while testing abstract execution HOT 5
- How to get the llvm::Function corresponding to SVFFunction? HOT 2
- Successor of BranchStmt can be confused HOT 10
- Question about branchID? HOT 9
- What are the meaning of the colored edges in a svfg? HOT 2
- Any path-sensitive pointer analysis? HOT 1
- -opt-svfg have no effect HOT 1
- The shortcomings of memcpy HOT 5
- Unable to output full function name in callgrah HOT 2
- some question about MTA HOT 1
- Filed sensitivity on nested struct HOT 10
- SVF gives wrong result when encountering different namespaces HOT 15
- What is varKills in MemSSA used for? HOT 1
- Question about applying SVF to real world large programs HOT 4
- Does svf implement type matching? HOT 3
- Is it possible to use parsed CLI args with `Options` in Util headers? HOT 3
- Assertion failed if `-cluster-fs` is enabled
- saber -dfree double free path and free() lines not showing
- Problematic Path-condition Solving.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svf.