evanmak / savior-source

source code for savior fuzzer
Apache License 2.0
126 stars 27 forks source link

KLEE installation #6

Closed zyh1121 closed 4 years ago

zyh1121 commented 4 years ago

Thanks for releasing the code and this looks very interesting!

I have a question regarding the KLEE part. I saw the KLEE binaries have already been build in the KLEE folder. Are we supposed to use the pre-built version in our installation? If so, is it correct to just do a make install according to https://github.com/evanmak/savior-source/blob/master/Docker/build_savior.sh#L162-L169?

I tried that. But it failed because of the missing CMakeLists.txt. Any suggestions?

Thanks again!!

root@2d071248c33d:~/work/savior/KLEE/klee-build# ll
total 88
drwxr-xr-x 11 root root  4096 Jun 20 17:57 ./
drwxr-xr-x  3 root root  4096 Jun 23 18:38 ../
-rw-r--r--  1 root root 21480 Jun 20 17:57 CMakeCache.txt
drwxr-xr-x  3 root root  4096 Jun 20 17:57 CMakeFiles/
-rw-r--r--  1 root root 12259 Jun 20 17:57 Makefile
drwxr-xr-x  3 root root  4096 Jun 20 17:57 Release+Debug+Asserts/
drwxr-xr-x  2 root root  4096 Jun 20 17:57 bin/
-rw-r--r--  1 root root  3335 Jun 20 17:57 cmake_install.cmake
drwxr-xr-x  3 root root  4096 Jun 20 17:57 docs/
drwxr-xr-x  3 root root  4096 Jun 20 17:57 include/
-rw-r--r--  1 root root   513 Jun 20 17:57 install_manifest.txt
drwxr-xr-x  9 root root  4096 Jun 20 17:57 lib/
drwxr-xr-x  9 root root  4096 Jun 20 17:57 runtime/
drwxr-xr-x  3 root root  4096 Jun 20 17:57 tests/
drwxr-xr-x 10 root root  4096 Jun 20 17:57 tools/

root@2d071248c33d:~/work/savior/KLEE/klee-build# make install
CMake Error: The source directory "/root/work/savior/KLEE" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Makefile:390: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
zyh1121 commented 4 years ago

Or, we could just follow the list in install_manifest.txt

/usr/local/lib/klee/runtime/klee-uclibc.bca
/usr/local/lib/klee/runtime/klee-uclibcxx.bca
/usr/local/include/klee/klee.h
/usr/local/lib/klee/runtime/kleeRuntimeIntrinsic.bc
/usr/local/lib/klee/runtime/klee-libc.bc
/usr/local/lib/klee/runtime/libkleeRuntimePOSIX.bca
/usr/local/lib/libkleeRuntest.so.1.0
/usr/local/lib/libkleeRuntest.so
/usr/local/bin/gen-random-bout
/usr/local/bin/kleaver
/usr/local/bin/klee
/usr/local/bin/klee-replay
/usr/local/bin/klee-stats
/usr/local/bin/ktest-tool
/usr/local/bin/converter

and copy those files to the specified locations?

If so, I could find all files except klee.h. Please advise if this is the correct approach to install the customized KLEE. If so, where could I locate klee.h?

Thanks again!

zyh1121 commented 4 years ago

ok. I just figured out we may not need to install KLEE globally. It seems the fuzzer will use a local copy specified by the config. thanks