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
66 stars 36 forks source link

Content of the "llfi.stat.fi.injectedfaults" file is wrong when both "fi_num_bits" and "window_len" are specified in the input.yaml file. #87

Closed Behroosh closed 8 years ago

Behroosh commented 8 years ago

In case both "fi_num_bits" and "window_len" are specified in the input.yaml file, except the first injection, all other injections have the same fi_cycle in the "llfi.stat.fi.injectedfaults" file, which should not be the case. For example if fi_num_bits = 4 and window_len = 10, LLFI should perform 8 injections, four of them should be injected into the first register in a specific fi_cycle and the other four into the second register in a specific fi_cycle. However, the fi_cycles that are traced in the llfi.stat.fi.injectedfaults are all the same from the second injection onwards.

"fi_num_bits" is used to specify the number of bits to flip for one faulty register. "window_len" is used to specify the maximum number of dynamic instances between TWO consecutive faults.

Behroosh commented 8 years ago

So I found a way to solve this issue. My suggestion is as follows:

1- Add "long long fi_cycle_to_print = config.fi_cycle;" to line 206 of the file "runtime_lib > FaultInjectionLib.c" 2- modify the line at line 230 of the file "runtime_lib > FaultInjectionLib.c" to "llfi_index, fi_cycle_to_print, my_reg_index, reg_pos, size, fi_bit, opcode_str);"

abrahamchan commented 8 years ago

This problem has been resolved by Behrooz's fix.