[LLVMdev] Problems on getting UNREACHABLE executed

Duncan Sands baldrick at free.fr
Tue Sep 18 01:02:54 PDT 2012


Hi Andy,

> I am currently using llvm to compile memcache to get the bitcode. I simply
> change all the "gcc -c" command to "clang -emit-llvm -c", and output ".o" to
> ".bc". And all gcc link command to llvm-ld. By these means, I successfully get
> the bitcode file, but when I run it using "lli", it fails with the error:
>
> UNREACHABLE executed!
> 0 lli 0x087c2cab
> Stack dump:
> 0. Program arguments lli timedrun.bc
> 1. Running Pass 'X86 Machine Code Emitter' on function @main
> aborted
>
> I encountered the same error when executing other executables in the project.
> Why does this happen? Is there any suggestions to get rid of such problem?

this probably means that the bitcode contains something that is not supported
by lli, such as inline assembler.  Try passing the -use-mcjit option to lli.
If that doesn't work, feel free to open a bugreport and attach the bitcode.

Ciao, Duncan.




More information about the llvm-dev mailing list