-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I am working with "stringsearch" from the MiBench test suite. I managed to instrument it when the target register is the destination register (dstreg). However, I get the following error message when I try to instrument the program using source registers (allsrcreg) as targets.
Cannot take the address of an intrinsic!
%fi13 = call void (i8_, i8_, i64, i32, i1)* (i64, void (i8_, i8_, i64, i32, i1), i32, i32, i32, i32, i8)* @injectFault17(i64 780, void (i8_, i8_, i64, i32, i1)* @llvm.memcpy.p0i8.p0i8.i64, i32 49, i32 5, i32 6, i32 6, i8* getelementptr inbounds ([5 x i8]* @call_namestr, i32 0, i32 0)), !llfi_injectfault !1
Cannot take the address of an intrinsic!
%fi20 = call void (i8_, i8_, i64, i32, i1)* (i64, void (i8_, i8_, i64, i32, i1), i32, i32, i32, i32, i8)* @injectFault17(i64 782, void (i8_, i8_, i64, i32, i1)* @llvm.memcpy.p0i8.p0i8.i64, i32 49, i32 5, i32 6, i32 6, i8* getelementptr inbounds ([5 x i8]* @call_namestr, i32 0, i32 0)), !llfi_injectfault !1
Broken module found, compilation aborted!
0 opt 0x00000000011f2942 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1 opt 0x00000000011f24f4
2 libpthread.so.0 0x00007f528dc2c340
3 libc.so.6 0x00007f528d06dcc9 gsignal + 57
4 libc.so.6 0x00007f528d0710d8 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 0x00007f528d058ec5 __libc_start_main + 245
12 opt 0x000000000058d40d
Stack dump:
0. Program arguments: /ubc/ece/home/kp/grads/behsan/Workload/LLFI_Build/llvm/bin/opt -load /ubc/ece/home/kp/grads/behsan/Workload/LLFI_Build/LLFI2/bin/../llvm_passes/llfi-passes.so -faultinjectionpass -insttype -excludeinst=ret -includeinst=all -regloc -allsrcreg -o /ubc/ece/home/kp/grads/behsan/Workload/LLFI_Build/SampleTest/stringsearch/llfi/stringsearch-faultinjection.ll /ubc/ece/home/kp/grads/behsan/Workload/LLFI_Build/SampleTest/stringsearch/llfi/stringsearch-llfi_index.ll -S
- Running pass 'Function Pass Manager' on module '/ubc/ece/home/kp/grads/behsan/Workload/LLFI_Build/SampleTest/stringsearch/llfi/stringsearch-llfi_index.ll'.
- Running pass 'Module Verifier' on function '@main'
ERROR: there was an error during running the instrumentation pass, please follow the provided instructions for instrument.