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

when we do AutoScan include trace,there is an error #98

Closed lidanfeng closed 8 years ago

lidanfeng commented 8 years ago

./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:

  1. Program arguments: /mnt/tools/llvm/bin/opt -load /mnt/tools/llfi/bin/../llvm_passes/llfi-passes.so -profilingpass -custominstselector -fiinstselectorname=BufferOverflow(API) -customregselector -firegselectorname=BufferOverflow(API) -insttracepass -o /mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflow(API)/llfi/dsware_osd-profiling.ll /mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflow(API)/llfi/dsware_osd-llfi_index.ll -S
  2. Running pass 'Function Pass Manager' on module '/mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflow(API)/llfi/dsware_osd-llfi_index.ll'.
  3. Running pass 'Module Verifier' on function '@osd_datanet_m_set_fmt_info'

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:

  1. Program arguments: /mnt/tools/llvm/bin/opt -load /mnt/tools/llfi/bin/../llvm_passes/llfi-passes.so -profilingpass -custominstselector -fiinstselectorname=BufferOverflowMalloc(Data) -customregselector -firegselectorname=BufferOverflowMalloc(Data) -insttracepass -o /mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflowMalloc(Data)/llfi/dsware_osd-profiling.ll /mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflowMalloc(Data)/llfi/dsware_osd-llfi_index.ll -S
  2. Running pass 'Function Pass Manager' on module '/mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflowMalloc(Data)/llfi/dsware_osd-llfi_index.ll'.
  3. Running pass 'Module Verifier' on function '@osd_datanet_m_set_fmt_info'

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:

  1. Program arguments: /mnt/tools/llvm/bin/opt -load /mnt/tools/llfi/bin/../llvm_passes/llfi-passes.so -profilingpass -custominstselector -fiinstselectorname=BufferOverflowMemmove(Data) -customregselector -firegselectorname=BufferOverflowMemmove(Data) -insttracepass -o /mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflowMemmove(Data)/llfi/dsware_osd-profiling.ll /mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflowMemmove(Data)/llfi/dsware_osd-llfi_index.ll -S
  2. Running pass 'Function Pass Manager' on module '/mnt/tools/llfi/test_suite/dsware_test/llfi-BufferOverflowMemmove(Data)/llfi/dsware_osd-llfi_index.ll'.
  3. Running pass 'Module Verifier' on function '@osd_datanet_m_set_fmt_info'
karthikp-ubc commented 8 years ago

We need a reproducible test case to debug this error. Please post one here and we can help. Thanks,