verifit / angie Goto Github PK
View Code? Open in Web Editor NEWNext generation of static analyzers
License: Other
Next generation of static analyzers
License: Other
Collected tasks relevant to console application variant of Angie. opt
pass variant is also planned, and that should considered when implementing console functionality.
TODO:
Pick a unit testing framework (probably gtest) and write test for created (S)MG representation #2.
Create a functioning Memory Graph representation, without any abstraction.
Created implementation should have a solid API and be backed by tests.
Design several possible ways how to attach information to instructions or values.
Present motivation for this is dead/live variable analysis - results of such an analysis could be precomputed and assigned either to CfgNodes (instructions) or to FrontendIds (values / SSA registers).
Info sources:
https://github.com/kdudka/predator/blob/master/cl/killer.cc
http://llvm.org/docs/doxygen/html/LiveVariables_8h_source.html
http://llvm.org/docs/doxygen/html/classllvm_1_1LiveVariables.html
What should the interaction of user and the analysis look like when an error has been found?
We can assume it should like like some kind of back-trace explaining the origin of such erroneous state.
Could be:
This issue is about
Keep in mind that Angie is meant to be an analysis framework.
Running angie on this code:
1 int main(void)
2 {
3 int *p = malloc(sizeof *p);
4 free(p);
5 free(p);
6
7 return 0;
8 }
Results in
terminate called after throwing an instance of 'NotSupportedException'
what(): attempted to call unknown function -- either an unsupported stdlib function or missing definition
The problem is that #include <stdlib.h>
is missing and calls to free
are wrapped in ConstExpr due to unknown prototype, e.g.:
call i32 (i32*, ...) bitcast (i32 (...)* @free to i32 (i32*, ...)*)(i32* %7)
Adding #include<stdlib.h>
fixes the problem:
$./angie -f db.ll
Error: Program tried to free an already freed memory.
We need access to program/functions/instructions details for proper development and debugging.
Implementation notes:
Generate map for values when creating CFG
Add "debugger mode" functionality -> retrieve all information on construction and cache it in the wrapper
Deletion used when iterating over a container which invalidates iterators upon such an operation. See code comments for more.
Adding an intrinsic IR instruction to trigger a special behaviour is relatively easy.
I would be interested in a way of simply annotating the IR code such that the analysis would trigger __builtin_trap() / __debugbreak() if compiled in debug mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.