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
I am working with "bfs" from the suggested test programs. I managed to instrument it when the target register is the destination register (dstreg). However, I get the following error message (in the instrumentation phase) when having source registers (allsrcreg) as target registers.
The unwind destination does not have a landingpad instruction!
invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(%"class.std::deque"* %wavefront, i32* %5)
to label %8 unwind label %73, !llfi_index !18
The unwind destination does not have a landingpad instruction!
%14 = invoke zeroext i1 @_ZNKSt5dequeIiSaIiEE5emptyEv(%"class.std::deque"* %wavefront)
to label %15 unwind label %73, !llfi_index !25
The unwind destination does not have a landingpad instruction!
%18 = invoke i32* @_ZNSt5dequeIiSaIiEE5frontEv(%"class.std::deque"* %wavefront)
to label %19 unwind label %73, !llfi_index !28
The unwind destination does not have a landingpad instruction!
invoke void @_ZNSt5dequeIiSaIiEE9pop_frontEv(%"class.std::deque"* %wavefront)
to label %21 unwind label %73, !llfi_index !31
The unwind destination does not have a landingpad instruction!
invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(%"class.std::deque"* %wavefront, i32* %id)
to label %68 unwind label %73, !llfiindex !81
LandingPadInst not the first non-PHI instruction in the block.
%74 = landingpad { i8, i32 } personality i8_ bitcast (i32 (...)* @gxx_personalityv0 to i8)
cleanup, !llfi_index !88
The unwind destination does not have a landingpad instruction!
invoke void @ZNSt5dequeIiSaIiEED2Ev(%"class.std::deque" %wavefront)
to label %87 unwind label %93, !llfiindex !93
LandingPadInst not the first non-PHI instruction in the block.
%94 = landingpad { i8, i32 } personality i8_ bitcast (i32 (...)* @__gxx_personalityv0 to i8)
catch i8_ null, !llfi_index !113
Broken module found, compilation aborted!
0 opt 0x00000000011f2942 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1 opt 0x00000000011f24f4
2 libpthread.so.0 0x00007f46bc78f340
3 libc.so.6 0x00007f46bbbd0cc9 gsignal + 57
4 libc.so.6 0x00007f46bbbd40d8 abort + 328
5 opt 0x0000000001117601
6 opt 0x0000000001120f42
7 opt 0x00000000010fb2cf llvm::FPPassManager::runOnFunction(llvm::Function&) + 623
8 opt 0x00000000010fb35b llvm::FPPassManager::runOnModule(llvm::Module&) + 43
9 opt 0x00000000010fd6c5 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 709
10 opt 0x0000000000572264 main + 2452
11 libc.so.6 0x00007f46bbbbbec5 libc_start_main + 245
12 opt 0x000000000058d40d
Stack dump:
I am working with "bfs" from the suggested test programs. I managed to instrument it when the target register is the destination register (dstreg). However, I get the following error message (in the instrumentation phase) when having source registers (allsrcreg) as target registers.
The unwind destination does not have a landingpad instruction! invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(%"class.std::deque"* %wavefront, i32* %5) to label %8 unwind label %73, !llfi_index !18 The unwind destination does not have a landingpad instruction! %14 = invoke zeroext i1 @_ZNKSt5dequeIiSaIiEE5emptyEv(%"class.std::deque"* %wavefront) to label %15 unwind label %73, !llfi_index !25 The unwind destination does not have a landingpad instruction! %18 = invoke i32* @_ZNSt5dequeIiSaIiEE5frontEv(%"class.std::deque"* %wavefront) to label %19 unwind label %73, !llfi_index !28 The unwind destination does not have a landingpad instruction! invoke void @_ZNSt5dequeIiSaIiEE9pop_frontEv(%"class.std::deque"* %wavefront) to label %21 unwind label %73, !llfi_index !31 The unwind destination does not have a landingpad instruction! invoke void @_ZNSt5dequeIiSaIiEE9push_backERKi(%"class.std::deque"* %wavefront, i32* %id) to label %68 unwind label %73, !llfiindex !81 LandingPadInst not the first non-PHI instruction in the block. %74 = landingpad { i8, i32 } personality i8_ bitcast (i32 (...)* @gxx_personalityv0 to i8) cleanup, !llfi_index !88 The unwind destination does not have a landingpad instruction! invoke void @ZNSt5dequeIiSaIiEED2Ev(%"class.std::deque" %wavefront) to label %87 unwind label %93, !llfiindex !93 LandingPadInst not the first non-PHI instruction in the block. %94 = landingpad { i8, i32 } personality i8_ bitcast (i32 (...)* @__gxx_personalityv0 to i8) catch i8_ null, !llfi_index !113 Broken module found, compilation aborted! 0 opt 0x00000000011f2942 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 opt 0x00000000011f24f4 2 libpthread.so.0 0x00007f46bc78f340 3 libc.so.6 0x00007f46bbbd0cc9 gsignal + 57 4 libc.so.6 0x00007f46bbbd40d8 abort + 328 5 opt 0x0000000001117601 6 opt 0x0000000001120f42 7 opt 0x00000000010fb2cf llvm::FPPassManager::runOnFunction(llvm::Function&) + 623 8 opt 0x00000000010fb35b llvm::FPPassManager::runOnModule(llvm::Module&) + 43 9 opt 0x00000000010fd6c5 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 709 10 opt 0x0000000000572264 main + 2452 11 libc.so.6 0x00007f46bbbbbec5 libc_start_main + 245 12 opt 0x000000000058d40d Stack dump:
ERROR: there was an error during running the instrumentation pass, please follow the provided instructions for instrument.