hameeza ahmed via llvm-dev
2019-Aug-25 19:35 UTC
[llvm-dev] Illegal instruction (core dumped) LLVM 8.0
Hello, I have implemented a pass to count total number of instructions in LLVM 8.0. Its source code is attached here. The pass runs fine with LLVM 4.0. But with LLVM 8.0 following error is shown; $ $LLVMopt_BIN/opt -load $LLVM_SO/LLVMStatic-Info.so -one output-simple.bc WARNING: You're attempting to print out a bitcode file. This is inadvisable as it may cause display problems. If you REALLY want to taste LLVM bitcode first-hand, you can force output with the `-f' option. %2+_Z5UsageiPPc 5 call:1,getelementptr:1,load:2,ret:1, _Z5UsageiPPc 5 5Stack dump: 0. Program arguments:opt -load /build/lib/LLVMStatic-Info.so -one output-simple.bc 1. Running pass 'Function Pass Manager' on module 'output-simple.bc'. 2. Running pass 'Numbers of Opcodes inside the program' on function '@_Z5UsageiPPc' #0 0x0000000002636939 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:495:11 #1 0x0000000002636ae9 PrintStackTraceSignalHandler(void*) /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:559:1 #2 0x0000000002634bd6 llvm::sys::RunSignalHandlers() /llvm-8.0.0.src/lib/Support/Signals.cpp:68:5 #3 0x000000000263718b SignalHandler(int) /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:358:1 #4 0x00007f9153c4f890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) #5 0x00007f91524b40fe (anonymous namespace)::opcodecount::runOnFunction(llvm::Function&) /llvm-8.0.0.src/lib/Transforms/Static-Info/Static-Info.cpp:30:1 #6 0x0000000001c64464 llvm::FPPassManager::runOnFunction(llvm::Function&) /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1644:23 #7 0x0000000001c64845 llvm::FPPassManager::runOnModule(llvm::Module&) /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1679:16 #8 0x0000000001c6507b (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1744:23 #9 0x0000000001c64b1b llvm::legacy::PassManagerImpl::run(llvm::Module&) /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1857:16 #10 0x0000000001c65651 llvm::legacy::PassManager::run(llvm::Module&) /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1888:3 #11 0x0000000000b54d93 main /llvm-8.0.0.src/tools/opt/opt.cpp:835:12 #12 0x00007f91526dbb97 __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 #13 0x0000000000b0a5fa _start (/build/bin/opt+0xb0a5fa) Illegal instruction (core dumped) what is the reason of this error? Please help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/d34beb18/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: Static-Info.cpp Type: text/x-c++src Size: 1555 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/d34beb18/attachment.cpp>
Praveen Velliengiri via llvm-dev
2019-Aug-25 19:41 UTC
[llvm-dev] Illegal instruction (core dumped) LLVM 8.0
Hi, Could please attach your IR file? Convert .bc into .ll file and send :) On Mon, 26 Aug 2019 at 01:06, hameeza ahmed via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello, > I have implemented a pass to count total number of instructions in LLVM > 8.0. Its source code is attached here. The pass runs fine with LLVM 4.0. > But with LLVM 8.0 following error is shown; > > $ $LLVMopt_BIN/opt -load $LLVM_SO/LLVMStatic-Info.so -one output-simple.bc > WARNING: You're attempting to print out a bitcode file. > This is inadvisable as it may cause display problems. If > you REALLY want to taste LLVM bitcode first-hand, you > can force output with the `-f' option. > %2+_Z5UsageiPPc 5 call:1,getelementptr:1,load:2,ret:1, > _Z5UsageiPPc 5 5Stack dump: > 0. Program arguments:opt -load /build/lib/LLVMStatic-Info.so -one > output-simple.bc > 1. Running pass 'Function Pass Manager' on module 'output-simple.bc'. > 2. Running pass 'Numbers of Opcodes inside the program' on function > '@_Z5UsageiPPc' > #0 0x0000000002636939 llvm::sys::PrintStackTrace(llvm::raw_ostream&) > /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:495:11 > #1 0x0000000002636ae9 PrintStackTraceSignalHandler(void*) > /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:559:1 > #2 0x0000000002634bd6 llvm::sys::RunSignalHandlers() > /llvm-8.0.0.src/lib/Support/Signals.cpp:68:5 > #3 0x000000000263718b SignalHandler(int) > /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:358:1 > #4 0x00007f9153c4f890 __restore_rt > (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) > #5 0x00007f91524b40fe (anonymous > namespace)::opcodecount::runOnFunction(llvm::Function&) > /llvm-8.0.0.src/lib/Transforms/Static-Info/Static-Info.cpp:30:1 > #6 0x0000000001c64464 llvm::FPPassManager::runOnFunction(llvm::Function&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1644:23 > #7 0x0000000001c64845 llvm::FPPassManager::runOnModule(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1679:16 > #8 0x0000000001c6507b (anonymous > namespace)::MPPassManager::runOnModule(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1744:23 > #9 0x0000000001c64b1b llvm::legacy::PassManagerImpl::run(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1857:16 > #10 0x0000000001c65651 llvm::legacy::PassManager::run(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1888:3 > #11 0x0000000000b54d93 main /llvm-8.0.0.src/tools/opt/opt.cpp:835:12 > #12 0x00007f91526dbb97 __libc_start_main > /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 > #13 0x0000000000b0a5fa _start (/build/bin/opt+0xb0a5fa) > Illegal instruction (core dumped) > > what is the reason of this error? > > Please help. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/c1f140bd/attachment.html>
hameeza ahmed via llvm-dev
2019-Aug-25 19:57 UTC
[llvm-dev] Illegal instruction (core dumped) LLVM 8.0
attached On Mon, Aug 26, 2019 at 12:43 AM hameeza ahmed <hahmed2305 at gmail.com> wrote:> > > On Mon, Aug 26, 2019 at 12:41 AM Praveen Velliengiri < > praveenvelliengiri at gmail.com> wrote: > >> Hi, Could please attach your IR file? Convert .bc into .ll file and send >> :) >> >> >> On Mon, 26 Aug 2019 at 01:06, hameeza ahmed via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> Hello, >>> I have implemented a pass to count total number of instructions in LLVM >>> 8.0. Its source code is attached here. The pass runs fine with LLVM 4.0. >>> But with LLVM 8.0 following error is shown; >>> >>> $ $LLVMopt_BIN/opt -load $LLVM_SO/LLVMStatic-Info.so -one >>> output-simple.bc >>> WARNING: You're attempting to print out a bitcode file. >>> This is inadvisable as it may cause display problems. If >>> you REALLY want to taste LLVM bitcode first-hand, you >>> can force output with the `-f' option. >>> %2+_Z5UsageiPPc 5 call:1,getelementptr:1,load:2,ret:1, >>> _Z5UsageiPPc 5 5Stack dump: >>> 0. Program arguments:opt -load /build/lib/LLVMStatic-Info.so -one >>> output-simple.bc >>> 1. Running pass 'Function Pass Manager' on module 'output-simple.bc'. >>> 2. Running pass 'Numbers of Opcodes inside the program' on function >>> '@_Z5UsageiPPc' >>> #0 0x0000000002636939 llvm::sys::PrintStackTrace(llvm::raw_ostream&) >>> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:495:11 >>> #1 0x0000000002636ae9 PrintStackTraceSignalHandler(void*) >>> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:559:1 >>> #2 0x0000000002634bd6 llvm::sys::RunSignalHandlers() >>> /llvm-8.0.0.src/lib/Support/Signals.cpp:68:5 >>> #3 0x000000000263718b SignalHandler(int) >>> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:358:1 >>> #4 0x00007f9153c4f890 __restore_rt >>> (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) >>> #5 0x00007f91524b40fe (anonymous >>> namespace)::opcodecount::runOnFunction(llvm::Function&) >>> /llvm-8.0.0.src/lib/Transforms/Static-Info/Static-Info.cpp:30:1 >>> #6 0x0000000001c64464 >>> llvm::FPPassManager::runOnFunction(llvm::Function&) >>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1644:23 >>> #7 0x0000000001c64845 llvm::FPPassManager::runOnModule(llvm::Module&) >>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1679:16 >>> #8 0x0000000001c6507b (anonymous >>> namespace)::MPPassManager::runOnModule(llvm::Module&) >>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1744:23 >>> #9 0x0000000001c64b1b llvm::legacy::PassManagerImpl::run(llvm::Module&) >>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1857:16 >>> #10 0x0000000001c65651 llvm::legacy::PassManager::run(llvm::Module&) >>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1888:3 >>> #11 0x0000000000b54d93 main /llvm-8.0.0.src/tools/opt/opt.cpp:835:12 >>> #12 0x00007f91526dbb97 __libc_start_main >>> /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 >>> #13 0x0000000000b0a5fa _start (/build/bin/opt+0xb0a5fa) >>> Illegal instruction (core dumped) >>> >>> what is the reason of this error? >>> >>> Please help. >>> _______________________________________________ >>> LLVM Developers mailing list >>> llvm-dev at lists.llvm.org >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>> >>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/acf55f87/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: output-simple.ll Type: application/octet-stream Size: 23383 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/acf55f87/attachment.obj>
Praveen Velliengiri via llvm-dev
2019-Aug-25 19:59 UTC
[llvm-dev] Illegal instruction (core dumped) LLVM 8.0
Hi Hameeza Yeah, I trying to reproduce the same behaviour with top of the trunk. If I succeeded, I will you let know :) Thanks On Mon, 26 Aug 2019 at 01:27, hameeza ahmed <hahmed2305 at gmail.com> wrote:> attached > > On Mon, Aug 26, 2019 at 12:43 AM hameeza ahmed <hahmed2305 at gmail.com> > wrote: > >> >> >> On Mon, Aug 26, 2019 at 12:41 AM Praveen Velliengiri < >> praveenvelliengiri at gmail.com> wrote: >> >>> Hi, Could please attach your IR file? Convert .bc into .ll file and send >>> :) >>> >>> >>> On Mon, 26 Aug 2019 at 01:06, hameeza ahmed via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> Hello, >>>> I have implemented a pass to count total number of instructions in LLVM >>>> 8.0. Its source code is attached here. The pass runs fine with LLVM 4.0. >>>> But with LLVM 8.0 following error is shown; >>>> >>>> $ $LLVMopt_BIN/opt -load $LLVM_SO/LLVMStatic-Info.so -one >>>> output-simple.bc >>>> WARNING: You're attempting to print out a bitcode file. >>>> This is inadvisable as it may cause display problems. If >>>> you REALLY want to taste LLVM bitcode first-hand, you >>>> can force output with the `-f' option. >>>> %2+_Z5UsageiPPc 5 call:1,getelementptr:1,load:2,ret:1, >>>> _Z5UsageiPPc 5 5Stack dump: >>>> 0. Program arguments:opt -load /build/lib/LLVMStatic-Info.so -one >>>> output-simple.bc >>>> 1. Running pass 'Function Pass Manager' on module 'output-simple.bc'. >>>> 2. Running pass 'Numbers of Opcodes inside the program' on function >>>> '@_Z5UsageiPPc' >>>> #0 0x0000000002636939 llvm::sys::PrintStackTrace(llvm::raw_ostream&) >>>> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:495:11 >>>> #1 0x0000000002636ae9 PrintStackTraceSignalHandler(void*) >>>> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:559:1 >>>> #2 0x0000000002634bd6 llvm::sys::RunSignalHandlers() >>>> /llvm-8.0.0.src/lib/Support/Signals.cpp:68:5 >>>> #3 0x000000000263718b SignalHandler(int) >>>> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:358:1 >>>> #4 0x00007f9153c4f890 __restore_rt >>>> (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) >>>> #5 0x00007f91524b40fe (anonymous >>>> namespace)::opcodecount::runOnFunction(llvm::Function&) >>>> /llvm-8.0.0.src/lib/Transforms/Static-Info/Static-Info.cpp:30:1 >>>> #6 0x0000000001c64464 >>>> llvm::FPPassManager::runOnFunction(llvm::Function&) >>>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1644:23 >>>> #7 0x0000000001c64845 llvm::FPPassManager::runOnModule(llvm::Module&) >>>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1679:16 >>>> #8 0x0000000001c6507b (anonymous >>>> namespace)::MPPassManager::runOnModule(llvm::Module&) >>>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1744:23 >>>> #9 0x0000000001c64b1b >>>> llvm::legacy::PassManagerImpl::run(llvm::Module&) >>>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1857:16 >>>> #10 0x0000000001c65651 llvm::legacy::PassManager::run(llvm::Module&) >>>> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1888:3 >>>> #11 0x0000000000b54d93 main /llvm-8.0.0.src/tools/opt/opt.cpp:835:12 >>>> #12 0x00007f91526dbb97 __libc_start_main >>>> /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 >>>> #13 0x0000000000b0a5fa _start (/build/bin/opt+0xb0a5fa) >>>> Illegal instruction (core dumped) >>>> >>>> what is the reason of this error? >>>> >>>> Please help. >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> llvm-dev at lists.llvm.org >>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>>> >>>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/1b662633/attachment.html>
Mehdi AMINI via llvm-dev
2019-Aug-25 20:27 UTC
[llvm-dev] Illegal instruction (core dumped) LLVM 8.0
On Sun, Aug 25, 2019 at 12:36 PM hameeza ahmed via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello, > I have implemented a pass to count total number of instructions in LLVM > 8.0. Its source code is attached here. The pass runs fine with LLVM 4.0. > But with LLVM 8.0 following error is shown; > > $ $LLVMopt_BIN/opt -load $LLVM_SO/LLVMStatic-Info.so -one output-simple.bc > WARNING: You're attempting to print out a bitcode file. > This is inadvisable as it may cause display problems. If > you REALLY want to taste LLVM bitcode first-hand, you > can force output with the `-f' option. > %2+_Z5UsageiPPc 5 call:1,getelementptr:1,load:2,ret:1, > _Z5UsageiPPc 5 5Stack dump: > 0. Program arguments:opt -load /build/lib/LLVMStatic-Info.so -one > output-simple.bc > 1. Running pass 'Function Pass Manager' on module 'output-simple.bc'. > 2. Running pass 'Numbers of Opcodes inside the program' on function > '@_Z5UsageiPPc' > #0 0x0000000002636939 llvm::sys::PrintStackTrace(llvm::raw_ostream&) > /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:495:11 > #1 0x0000000002636ae9 PrintStackTraceSignalHandler(void*) > /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:559:1 > #2 0x0000000002634bd6 llvm::sys::RunSignalHandlers() > /llvm-8.0.0.src/lib/Support/Signals.cpp:68:5 > #3 0x000000000263718b SignalHandler(int) > /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:358:1 > #4 0x00007f9153c4f890 __restore_rt > (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) > #5 0x00007f91524b40fe (anonymous > namespace)::opcodecount::runOnFunction(llvm::Function&) > /llvm-8.0.0.src/lib/Transforms/Static-Info/Static-Info.cpp:30:1 > #6 0x0000000001c64464 llvm::FPPassManager::runOnFunction(llvm::Function&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1644:23 > #7 0x0000000001c64845 llvm::FPPassManager::runOnModule(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1679:16 > #8 0x0000000001c6507b (anonymous > namespace)::MPPassManager::runOnModule(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1744:23 > #9 0x0000000001c64b1b llvm::legacy::PassManagerImpl::run(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1857:16 > #10 0x0000000001c65651 llvm::legacy::PassManager::run(llvm::Module&) > /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1888:3 > #11 0x0000000000b54d93 main /llvm-8.0.0.src/tools/opt/opt.cpp:835:12 > #12 0x00007f91526dbb97 __libc_start_main > /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 > #13 0x0000000000b0a5fa _start (/build/bin/opt+0xb0a5fa) > Illegal instruction (core dumped) > > what is the reason of this error? >Can you try adding a return statement to your run() method? It is returning a value and it is UB to not do so. -- Mehdi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190825/e64cdfa5/attachment.html>
hameeza ahmed via llvm-dev
2019-Aug-26 06:35 UTC
[llvm-dev] Illegal instruction (core dumped) LLVM 8.0
Thank You. I put return 1; in the end ...................... for(BasicBlock::iterator it = bb->begin(), end = bb->end();it!=end;++it) { ++op_counter[it->getOpcodeName()]; } for (std::map<std::string, int>::iterator it op_counter.begin(), end = op_counter.end(); it != end; ++it) { errs() << it->first << ":" << it->second << ","; } } globalCount+=instCount; errs() << "\n"<<func.getName() << "\t" << instCount << "\t" << globalCount; return 1; } Now it is working fine. On Mon, Aug 26, 2019 at 1:27 AM Mehdi AMINI <joker.eph at gmail.com> wrote:> > > On Sun, Aug 25, 2019 at 12:36 PM hameeza ahmed via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hello, >> I have implemented a pass to count total number of instructions in LLVM >> 8.0. Its source code is attached here. The pass runs fine with LLVM 4.0. >> But with LLVM 8.0 following error is shown; >> >> $ $LLVMopt_BIN/opt -load $LLVM_SO/LLVMStatic-Info.so -one output-simple.bc >> WARNING: You're attempting to print out a bitcode file. >> This is inadvisable as it may cause display problems. If >> you REALLY want to taste LLVM bitcode first-hand, you >> can force output with the `-f' option. >> %2+_Z5UsageiPPc 5 call:1,getelementptr:1,load:2,ret:1, >> _Z5UsageiPPc 5 5Stack dump: >> 0. Program arguments:opt -load /build/lib/LLVMStatic-Info.so -one >> output-simple.bc >> 1. Running pass 'Function Pass Manager' on module 'output-simple.bc'. >> 2. Running pass 'Numbers of Opcodes inside the program' on function >> '@_Z5UsageiPPc' >> #0 0x0000000002636939 llvm::sys::PrintStackTrace(llvm::raw_ostream&) >> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:495:11 >> #1 0x0000000002636ae9 PrintStackTraceSignalHandler(void*) >> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:559:1 >> #2 0x0000000002634bd6 llvm::sys::RunSignalHandlers() >> /llvm-8.0.0.src/lib/Support/Signals.cpp:68:5 >> #3 0x000000000263718b SignalHandler(int) >> /llvm-8.0.0.src/lib/Support/Unix/Signals.inc:358:1 >> #4 0x00007f9153c4f890 __restore_rt >> (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) >> #5 0x00007f91524b40fe (anonymous >> namespace)::opcodecount::runOnFunction(llvm::Function&) >> /llvm-8.0.0.src/lib/Transforms/Static-Info/Static-Info.cpp:30:1 >> #6 0x0000000001c64464 >> llvm::FPPassManager::runOnFunction(llvm::Function&) >> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1644:23 >> #7 0x0000000001c64845 llvm::FPPassManager::runOnModule(llvm::Module&) >> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1679:16 >> #8 0x0000000001c6507b (anonymous >> namespace)::MPPassManager::runOnModule(llvm::Module&) >> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1744:23 >> #9 0x0000000001c64b1b llvm::legacy::PassManagerImpl::run(llvm::Module&) >> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1857:16 >> #10 0x0000000001c65651 llvm::legacy::PassManager::run(llvm::Module&) >> /llvm-8.0.0.src/lib/IR/LegacyPassManager.cpp:1888:3 >> #11 0x0000000000b54d93 main /llvm-8.0.0.src/tools/opt/opt.cpp:835:12 >> #12 0x00007f91526dbb97 __libc_start_main >> /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 >> #13 0x0000000000b0a5fa _start (/build/bin/opt+0xb0a5fa) >> Illegal instruction (core dumped) >> >> what is the reason of this error? >> > > Can you try adding a return statement to your run() method? It is > returning a value and it is UB to not do so. > > -- > Mehdi > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190826/9c68621a/attachment.html>