Unable to query z3 solver : exec format error
malocharo opened this issue · comments
Hi, I got an Exec format error
when trying to invoke souper to extract SMT queries from a bitcode file.
~/Documents/souper_build/souper -z3-path=~/Documents/souper/third_party/z3-install/bin/z3 test.bc
; Listing valid replacements.
; Using solver: Z3 + internal cache
Unable to query solver: Exec format error
Exec format error often come from architecture differences:
file souper
souper: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e4e891f60e489712eb3b9126b4d1d1aa47962a8c, for GNU/Linux 3.2.0, with debug_info, not stripped
file z3
z3: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=11deeea9161aa4e829d91e422bde3ad961fe5cd1, for GNU/Linux 3.2.0, not stripped
I used the souper clang executable to generate the test.bc
file.
file clang-11
clang-11: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=181289344bcef8c2f4846a711a7e901a9ec87487, for GNU/Linux 3.2.0, not stripped
uname -m
x86_64
everything seems correct to me, that's why I don't understand the error message.
Thanks in advance.
What's the output of
~/Documents/souper/third_party/z3-install/bin/z3 -version
~/Documents/souper/third_party/z3-install/bin/z3 -version
Z3 version 4.8.8 - 64 bit
ok, put the full path in -z3-path= instead of putting a shell expansion in there
~/Documents/souper_build/souper -z3-path=/home/foo/Documents/souper/third_party/z3-install/bin/z3 test.bc' '; Listing valid replacements.' '; Using solver: Z3 + internal cache
ok seems to be better, I got no exec format error anymore.
Thank you !