DependableSystemsLab / LLFI

LLFI is an LLVM based fault injection tool, that injects faults into the LLVM IR of the application source code. The faults can be injected into specific program points, and the effect can be easily tracked back to the source code. Please refer to the paper below. NOTE: If you publish a paper using LLFI, please add it to PaperLLFI.bib
http://blogs.ubc.ca/karthik/2014/02/23/quantifying-the-accuracy-of-high-level-fault-injection-techniques/
Other
68 stars 35 forks source link

Profiling problems in the main function #114

Open shumeit opened 6 years ago

shumeit commented 6 years ago

During profiling, LLFI tries to inject endProfiling callback functions at the end of the main function. In the original codes, LLFI obtains the last instruction in the last basic block and injects endProfiling before the last instruction. It's generally true in most cases but in some cases the return/unreachable instruction is not always in the last instruction in the last basic block.

In my case, the return instruction is in the BB that is before the last BB in the main function. Therefore, to handle this problem, we'll check if the instruction obtained is return or unreachable instruction. If it's not, then iterate through all the functions in main() to find the real return/unreachable instruction.

One issue occurred after the modification is not yet solved. When we turn on the "tracingPropagation" option in input.yaml and run the instrumentation, there will be error regarding to the violation of SSA form in LLVM.