soarlab / kulfi Goto Github PK
View Code? Open in Web Editor NEWLLVM Instruction Level Fault Injector
License: Other
LLVM Instruction Level Fault Injector
License: Other
KULFI beta version does not support C++
https://github.com/soar-lab/KULFI/blob/master/src/main/faults.cpp#L180
Why is cloning of this instruction necessary?
From the code, I guess the purpose is to "get a pointer to the next instruction to (*I) without having to deal with the edge case that BINext points to the end of BB" (many injection codes have two branches on whether or not BINext is the end of a Basic Block ".
Update: I guess the purpose of clone() is such that "replaceAllUses" may be used:
https://github.com/soar-lab/KULFI/blob/master/src/main/faults.cpp#L253
But it's also possible to avoid the use of replaceAllUses with something like the following:
BasicBlock::iterator BI2 = BINext;
while(BI2 != BB->end()) {
Instruction* valu = &(*BI2);
valu->replaceUsesOfWith(inst, corruptedPtr);
BI2++;
}
Add option to enumerate fault site
I think we should support selecting a list of functions for error injection from command line. Then errors would be injected just in those particular functions.
Add option to print fault site count and related details for both dynamic and static fault injection. Currently we are using w/a for our experimentations.
The current range of fault probability (-fp flag) restricted to 1-100. This won't be sufficient for dynamic instructions as there is no upper bound. So, this restriction should be removed.
kapura1@devvbox:~/src/oss/llvm-3.2/llvm-3.2.src/lib/Transforms/Faults$ make
llvm[0]: Compiling faults.cpp for Release+Asserts build (PIC)
In file included from faults.cpp:24:
In file included from /home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/Pass.h:374:
In file included from /home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/PassAnalysisSupport.h:23:
In file included from /home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/ADT/SmallVector.h:17:
/home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/Support/AlignOf.h:90:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(1);
^
/home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
char alignas(x) aligned;
^
/home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/Support/AlignOf.h:91:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(2);
^
/home/kapura1/src/oss/llvm-3.2/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
char alignas(x) aligned;
^
Checking the debian archives - llvm 3.2 version has been removed
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714215
Will this work with later versions of llvm ?
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.