- Change directory to fault injection base
# example
cd perInstFI # per-Instruction FI
cd randomFI # random FI
- Compile sqrt.c to readable IR:
clang -emit-llvm -S *.c
- Instrument IR-level codes to readable IR:
instrument --readable sqrt.ll
- Profile: run a fault-free IR:
profile ./llfi/sqrt-profiling.exe
- Fault Injection: run a fault-injected IR:
injectfault ./llfi/sqrt-faultinjection.exe
- Analyze FI results:
python3 measure.py