[klee-dev] Fwd: Is llvm incompatible with some cpu instruction sets?

Daniel Liew daniel.liew at imperial.ac.uk
Thu May 8 11:07:14 BST 2014


On 8 May 2014 09:54, agan Davis <agandavis at gmail.com> wrote:
>
> Hi Dan
>
> The backtrace information below(simplify)
> gdb$bt
> #0 0x0000000000e63f2d in std::vector<__gnu_cxx::_Hashtable_node<std::pair<BEEV::ASTNode const, BEEV::ASTNode>>....
> #1 0x0000000000ebacfd in __gnu_cxx::hash_map...
> #2 0x000000000055775c in _GLOBAL__sub_I__ZN7printer13NodeLetVarMapE()...
> #3 0x0000000000fddb7d in __libc_csu_init ()
> #4 0x00007ffff6e099700 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
> #50x0000000000558969 in _start()

The location that the error is occurring is in the initialisation of
data structures used by STP. This is happening even before you reach
main()

> The os klee run on is ubuntu12.04/64bit vmware machine. At beginning, the  ubuntu vmware machine  on the host macbook pro( i7-2760QM),  running nomally but slowly, so I upload this vmware to  server( E74830), building klee again, building successful but coming across the problem above. I tried klee/llvm3.1-3.3, getting the some problem,
> I'm afraid that the same problem as llvm3.4.
>
> In E74830,
> $gcc -c -Q --help=target|grep march
> -march =x86_64
>
>
> In  i7-2760QM
> $gcc -c -Q --help=target|grep march$gcc -c -Q --help=target|grep march
>  -march=corei7-avx

Oh cool I didn't know about the -Q option. Nice! And this shows a
potential source of your problem

On your i7-2760QM gcc is by default using a more specific architecture
but on your E74830 it is using the generic x86_64 architecture. I
think you mentioned earlier that your  i7-2760QM has a larger
instruction set than the E74830 so your issue looks like the code you
built for LLVM/STP/KLEE contains instructions that i7-2760QM has but
the E74830 does not.

The way to fix depends on how you plan to do development.

- If you need to run your VM both on i7-2760QM and E74830 you should
rebuild everything* ensuring that -march=x86_64 is passed to your
C/C++ compiler
- If you only need to run on your E74830 then simply rebuild
everything* on the E74830 machine.

* i.e. LLVM, STP and then KLEE


Hope that helps.

Dan.




More information about the klee-dev mailing list