Comments (5)
Hi Kim,
This is not a bug in SVF.
You may wish to check your g++/clang++ options when compiling the source code of LLVM-3.8.0. If you use std=c++11 to compile llvm-3.8.0, but use std=c++98 to compile SVF, or the other way around, then you may see this error. This error occurs when you use "autoconf" to build SVF, you have to manually correct it to make the options consistent.
"autoconf" will be deprecated soon in later versions of LLVM. I suggest you use cmake (https://github.com/unsw-corg/SVF/wiki/Setup-Guide-(CMake)) to build SVF.
The error will disappear when you use cmake build.
Thanks
from svf.
Hmm, I'm seeing this issue
- I'm using CMake
- I've built LLVM-3.8 and SVF with same compiler and same flags, and tried GCC 5.4, 6, clang_4
This issue happens 100% of the time when using #18, however I don't know that it's caused by those changes--it seems it just gets less lucky with the underlying bug.
@rockysui can you verify that running wpa -anders -svfg -dump-svfg
on the tutorial's input works correctly and that running it under valgrind reports no errors?
For me, on the current master (using LLVM 3.8) as well as the LLVM 4 changes valgrind reports errors resulting from accessing MemSSA bits that have been deleted. Looking at the code it's easy to see why--indeed they /have/ been deleted. I'm not sure why this happens less on master, and AFAICT has little to do with the C++ standard used to compile the code.
I have patched this issue in my fork which fixes the crash on LLVM 4 and the valgrind errors in both versions.
If indeed this is a problem, perhaps you should be less quick to close bugs (at least wait for the OP to confirm they're resolved)?
from svf.
Hi WIll,
Thanks for confirming this issue and your attempts to fix it!
The aim of building MemSSA is to create SVFG, so MemSSA is an intermediate data structure and will be discarded later. When creating a SVFG, a local instance of memSSA is created (Please take a look at here). This might be the issue when any of its fields is referred later (e.g., dumpSVFG).
I don't know whether we can have a quick workaround fix by simply allocating the MemSSA instance on the heap.
@jcarlson23
Sorry that I am pretty busy with a paper deadline these two weeks, and will try to get a complete fix for this issue and Jared's pull request asap.
from svf.
I've implemented a quickfix here: dtzWill@49a0464
One implication is the mssa is preserved for the lifetime of the SVFG, which for this use case is desired but I don't know about what other clients might want.
For convenience and lack of familiarity with the codebase I just used unique_ptr, anyway it seems to work for me so I thought I'd share in case it's useful to someone else. 👍
from svf.
Thanks, Will! A very good fix using unique_ptr.
The C++11 style is not consistent with SVF. I have committed a quick fix by allocating the "mssa' on the heap instead of a local instance, and also I have kept a "ReleaseMemory" function to be called by users (see f752075).
Anyway, SVF folks could make their own choices to use any of the fixes.
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.