<div dir="ltr">Hi all,<div><br></div><div style>I find all my passes are all broken with LLVM 3.4. Then I tried out the LLVMHello.so specified in the LLVM doc,<br></div><div style><a href="http://llvm.org/docs/WritingAnLLVMPass.html">http://llvm.org/docs/WritingAnLLVMPass.html</a> <br>
</div><div style>and it also crashes.</div><div style><br></div><div style>It seems all the functions in the pass do work, but LLVM crashes in the doFinalization() step. </div><div style><br></div><div style>Does anyone know this problem? </div>
<div style><br></div><div style>Thanks!</div><div style>Tianyin</div><div style><br></div><div style>-----------------------------------------------------------------------------------------------------------------</div><div style>
<br></div><div><div>#opt -load ../../../Debug+Asserts/lib/LLVMHello.so -hello -time-passes < bcfiles/hello.bc<br></div><div style>...</div><div style>(PRINT ALL THE FUNCTIONS, EVERYTHING IS FINE.)</div><div style>...</div>
<div><div>wrong initalizer for intrinsic global variable</div><div>[0 x i8*] zeroinitializer</div><div>Broken module found, compilation aborted!</div><div>0  opt             0x00000000019ac447 llvm::sys::PrintStackTrace(_IO_FILE*) + 38</div>
<div>1  opt             0x00000000019ac6ce</div><div>2  opt             0x00000000019ac112</div><div>3  libpthread.so.0 0x00007feee0c77cb0</div><div>4  libc.so.6       0x00007feedfca2425 gsignal + 53</div><div>5  libc.so.6       0x00007feedfca5b8b abort + 379</div>
<div>6  opt             0x0000000001953173</div><div>7  opt             0x0000000001953097</div><div>8  opt             0x0000000001928676 llvm::FPPassManager::doFinalization(llvm::Module&) + 88</div><div>9  opt             0x0000000001928a8a</div>
<div>10 opt             0x0000000001928ef0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 254</div><div>11 opt             0x0000000001929103 llvm::legacy::PassManager::run(llvm::Module&) + 39</div><div>12 opt             0x00000000008f88cd main + 5778</div>
<div>13 libc.so.6       0x00007feedfc8d76d __libc_start_main + 237</div><div>14 opt             0x00000000008ea589</div><div>Stack dump:</div><div>0.<span class="" style="white-space:pre">       </span>Program arguments: opt -load ../../../Debug+Asserts/lib/LLVMHello.so -hello -time-passes </div>
<div>Aborted (core dumped)</div></div><div><br></div>-- <br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="color:rgb(102,102,102);font-family:arial;font-size:small">Tianyin XU,<br>
<a href="http://cseweb.ucsd.edu/%7Etixu/" target="_blank">http://cseweb.ucsd.edu/~tixu/</a></span></span>
</div></div>