andreafioraldi / qasan

QASan is a custom QEMU 3.1.1 that detects memory errors in the guest using AddressSanitizer.
https://andreafioraldi.github.io/assets/qasan-secdev20.pdf
Other
337 stars 35 forks source link

python not found and error building #15

Closed TheCrott closed 3 years ago

TheCrott commented 3 years ago

I got error when building on ubuntu 20.04 with llvm 12, python3.8 At first it doesn't found my python so I add to build.py but it still got error

cd '/home/aldo/qasan/qemu' ; ./configure --target-list="x86_64-linux-user" --disable-system --enable-pie       --cc="/home/aldo/llvm-project/build/bin/clang-12" --cxx="/home/aldo/llvm-project/build/bin/clang++"  --extra-cflags="-O3 -ggdb " --extra-ldflags="-L /home/aldo/qasan -lclang_rt.asan-x86_64 -Wl,-rpath,.,-rpath,/home/aldo/qasan"       --enable-linux-user --disable-gtk --disable-sdl --disable-vnc --disable-strip --python=/usr/bin/python3

ERROR: "/home/aldo/llvm-project/build/bin/clang-12" cannot build an executable (is your linker broken?)

Traceback (most recent call last):
  File "build.py", line 210, in <module>
    assert (os.system(cmd) == 0)
AssertionError

Any ideas why?

andreafioraldi commented 3 years ago

Have u tried to compile vanilla qemu 3.1.1?

TheCrott commented 3 years ago

Have u tried to compile vanilla qemu 3.1.1?

Yes, I'm able to use qemu 3.1.1 in afl++

andreafioraldi commented 3 years ago

With clang 12? this is a qemu error, try to use the configure script by hand without build.py