<div dir="ltr">Hi all,<br><br>I am new with LLVM and I am trying to build and test a pass based on "Writing an LLVM Pass: <a href="http://llvm.org/docs/WritingAnLLVMPass.html">http://llvm.org/docs/WritingAnLLVMPass.html</a>". I did as the same as tutorial and everything works till running the pass with opt. When I run the pass with opt I got a segmentation fault. Could you please tell how I can solve this error? <br>
<br><br><br>~/LLVM/build/lib/Transforms/Hello$ opt-3.0 -load ../../../Debug+Asserts/lib/Hello.so -hello < Hello.bc > /dev/null<br>Hello: <br>0  libLLVM-3.0.so.1 0x00007f875dda6fcf<br>1  libLLVM-3.0.so.1 0x00007f875dda7591<br>
2  libpthread.so.0  0x00007f875cd30cb0<br>3  libLLVM-3.0.so.1 0x00007f875d8d4a6f llvm::PMTopLevelManager::findAnalysisPass(void const*) + 159<br>4  libLLVM-3.0.so.1 0x00007f875d8d4bae llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 190<br>
5  libLLVM-3.0.so.1 0x00007f875d8d755e llvm::PassManager::add(llvm::Pass*) + 254<br>6  opt-3.0          0x000000000040dca6 main + 3158<br>7  libc.so.6        0x00007f875c67e76d __libc_start_main + 237<br>8  opt-3.0          0x000000000040e141<br>
Stack dump:<br>0.    Program arguments: opt-3.0 -load ../../../Debug+Asserts/lib/Hello.so -hello <br>Segmentation fault (core dumped)<br><br>//Thanks<br>Danna<br></div>