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

tracegraph oneoff error #71

Closed karfair closed 8 years ago

karfair commented 9 years ago

Tracegraph reports llfi index 64 as the injection point, whereas the real injection is llfi index 63: image

When tracegraph are generated, the reported injection point in the graph is off by one unless a 'ret' instruction is injected or no SDC occurs.

No error: image

This seems to be due to the llfi.stat.trace.*-*.txt (under llfi/llfi_stat_output) outputting the instruction _after_ the fault injected instruction. This leads to the TraceDiffReportFile.*-*.txt (under llfi/trace_report_output, generated by the tool tracediff.py) being one off, and leads to the generated graph being one off.

llfi.stat.trace.*-*.txt reporting the instruction after the fault injected instruction seems to be because in some cases, during instrumentation, calls to @printInstTrace happens before calls to @injectFault. Since @printInstTrace tracks whether the fault has been injected yet and also generates the llfi.stat.trace file, it detects the fault being injected in the next instruction instead of the current instruction.

Changing the pass order (calling the -insttracepass before the -faultinjection pass) works in some cases but in some cases the faultinjection executable will just hang so this is not a solution.

This issue only affects the generated tracegraph file and nothing else.

karfair commented 8 years ago

fixed in commit '9949c0ecd050a5a29f5a20884f2fe8327b51d5f1'