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
./SoftwareFailureAutoScan -numOfRuns 5 /mnt/tools/llfi/test_suite/dsware_test/dsware_osd.bc
Then we do SoftwareFailureAutoScan again,and it's still have error: root@SZX1000079191:/mnt/tools/llfi/bin# ./batchInstrument --readable /mnt/tools/llfi/test_suite/dsware_test/dsware_osd.bc Instruction does not dominate all uses! %llfi_trace = alloca i32 store i32 0, i32* %llfi_trace Instruction does not dominate all uses! %llfi_trace1 = alloca [5 x i8] store [5 x i8] c"call\00", [5 x i8]* %llfi_trace1 Instruction does not dominate all uses! %llfi_trace1 = alloca [5 x i8] call void @printInstTracer(i32 49, [5 x i8]* %llfi_trace1, i32 4, i32* %llfi_trace, i32 1000) Instruction does not dominate all uses! %llfi_trace = alloca i32 call void @printInstTracer(i32 49, [5 x i8]* %llfi_trace1, i32 4, i32* %llfi_trace, i32 1000) Broken module found, compilation aborted! 0 opt 0x0000000001348872 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 opt 0x0000000001347e21 2 libpthread.so.0 0x00007f1f7a31ecb0 3 libc.so.6 0x00007f1f79774425 gsignal + 53 4 libc.so.6 0x00007f1f79777b8b abort + 379 5 opt 0x00000000012672fb 6 opt 0x000000000123c6ac llvm::FPPassManager::runOnFunction(llvm::Function&) + 540 7 opt 0x000000000123c74b llvm::FPPassManager::runOnModule(llvm::Module&) + 43 8 opt 0x000000000123c2fc llvm::legacy::PassManagerImpl::run(llvm::Module&) + 748 9 opt 0x0000000000576346 main + 4486 10 libc.so.6 0x00007f1f7975f76d __libc_start_main + 237 11 opt 0x000000000058ff15 Stack dump:
ERROR: there was an error during running the instrumentation pass, please follow the provided instructions for instrument. instrumenting: BufferOverflow(API) failed! Instruction does not dominate all uses! %llfi_trace = alloca i32 store i32 0, i32* %llfi_trace Instruction does not dominate all uses! %llfi_trace1 = alloca [5 x i8] store [5 x i8] c"call\00", [5 x i8]* %llfi_trace1 Instruction does not dominate all uses! %llfi_trace1 = alloca [5 x i8] call void @printInstTracer(i32 49, [5 x i8]* %llfi_trace1, i32 4, i32* %llfi_trace, i32 1000) Instruction does not dominate all uses! %llfi_trace = alloca i32 call void @printInstTracer(i32 49, [5 x i8]* %llfi_trace1, i32 4, i32* %llfi_trace, i32 1000) Broken module found, compilation aborted! 0 opt 0x0000000001348872 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 opt 0x0000000001347e21 2 libpthread.so.0 0x00007ff4fff90cb0 3 libc.so.6 0x00007ff4ff3e6425 gsignal + 53 4 libc.so.6 0x00007ff4ff3e9b8b abort + 379 5 opt 0x00000000012672fb 6 opt 0x000000000123c6ac llvm::FPPassManager::runOnFunction(llvm::Function&) + 540 7 opt 0x000000000123c74b llvm::FPPassManager::runOnModule(llvm::Module&) + 43 8 opt 0x000000000123c2fc llvm::legacy::PassManagerImpl::run(llvm::Module&) + 748 9 opt 0x0000000000576346 main + 4486 10 libc.so.6 0x00007ff4ff3d176d __libc_start_main + 237 11 opt 0x000000000058ff15 Stack dump:
ERROR: there was an error during running the instrumentation pass, please follow the provided instructions for instrument. instrumenting: BufferOverflowMalloc(Data) failed! Instruction does not dominate all uses! %llfi_trace = alloca i32 store i32 0, i32* %llfi_trace Instruction does not dominate all uses! %llfi_trace1 = alloca [5 x i8] store [5 x i8] c"call\00", [5 x i8]* %llfi_trace1 Instruction does not dominate all uses! %llfi_trace1 = alloca [5 x i8] call void @printInstTracer(i32 49, [5 x i8]* %llfi_trace1, i32 4, i32* %llfi_trace, i32 1000) Instruction does not dominate all uses! %llfi_trace = alloca i32 call void @printInstTracer(i32 49, [5 x i8]* %llfi_trace1, i32 4, i32* %llfi_trace, i32 1000) Broken module found, compilation aborted! 0 opt 0x0000000001348872 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 opt 0x0000000001347e21 2 libpthread.so.0 0x00007f565bd85cb0 3 libc.so.6 0x00007f565b1db425 gsignal + 53 4 libc.so.6 0x00007f565b1deb8b abort + 379 5 opt 0x00000000012672fb 6 opt 0x000000000123c6ac llvm::FPPassManager::runOnFunction(llvm::Function&) + 540 7 opt 0x000000000123c74b llvm::FPPassManager::runOnModule(llvm::Module&) + 43 8 opt 0x000000000123c2fc llvm::legacy::PassManagerImpl::run(llvm::Module&) + 748 9 opt 0x0000000000576346 main + 4486 10 libc.so.6 0x00007f565b1c676d __libc_start_main + 237 11 opt 0x000000000058ff15 Stack dump: