evanmak / savior-source

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

problem: compile the libtiff #13

Open oneCoderMan opened 3 years ago

oneCoderMan commented 3 years ago

the target software: https://download.osgeo.org/libtiff/tiff-4.0.10.tar.gz
the build.sh:

export SOFTWARE_DIR=/root/softwares
export WORK_DIR=/root/work/

export PROG=tiffcp 

# generate whole program bc
export CC=wllvm 
export LLVM_COMPILER=clang 
export CFLAGS="-fsanitize=integer,bounds,shift -g" 
export LDFLAGS=-lubsan
./configure  --enable-shared=no --enable-static=yes
make clean
make 

# extract bc
extract-bc tools/$PROG

#set up fuzzing work dir
mkdir obj-savior
cp tools/$PROG.bc obj-savior
cd obj-savior

#generate binary to be fuzzed and target bc to be analyzed
$WORK_DIR/savior/AFL/afl-clang-fast $PROG.bc -o savior-$PROG -lubsan -lm

#run svf analyzer (llvm-4.0) on the target bc
$WORK_DIR/savior/svf/SVF/Release-build/bin/dma -fspta savior-$PROG.bc -savior-label-only -o $PROG.reach.bug -edge $PROG.edge

#run insertbug pass to generate bc runnable by llvm-3.6 (required by klee) with bug coverage infomation
opt -load /root/work/savior/svf/InsertBugPotential/build/insertpass/libInsertBugPass.so -InsertBug -i $PROG.reach.bug savior-$PROG.bc -o savior-$PROG.dma.bc

but when I execute the command $WORK_DIR/savior/AFL/afl-clang-fast $PROG.bc -o savior-$PROG -lubsan -lm the problem is as follow, could tell me how to fix it

image image

White-Mouse commented 2 years ago

I have the same problem, did you solve it?