Skip to content

Bugs I encountered when running IntAbs #1

@LuckyYZC

Description

@LuckyYZC

Dear Author,
I encountered some bugs when I running IntAbs. If you have some suggestions for fixing these errors, I would be very grateful.
When I run the instruction "make", it reports the following errors.

[ 16%] Building CXX object worklist-ai/CMakeFiles/worklistAI.dir/worklistai.cpp.o
/home/guisen/source/intAbs/src/worklist-ai/worklistai.cpp: In member function ‘void WorklistAI::addDomLoadStoreFacts(std::set<llvm::Function*>, z3::context&, _Z3_fixedpoint*&)’:
/home/guisen/source/intAbs/src/worklist-ai/worklistai.cpp:2038:45: error: no matching function for call to ‘llvm::DominatorTree::DominatorTree(llvm::Function&)’
         DominatorTree &dt = DominatorTree(*f);
                                             ^
/home/guisen/source/intAbs/src/worklist-ai/worklistai.cpp:2038:45: note: candidates are:
In file included from /usr/lib/llvm-3.6/include/llvm/Analysis/PostDominators.h:17:0,
                 from /home/guisen/source/intAbs/src/worklist-ai/worklistai.cpp:20:
/usr/lib/llvm-3.6/include/llvm/IR/Dominators.h:77:3: note: llvm::DominatorTree::DominatorTree(llvm::DominatorTree&&)
   DominatorTree(DominatorTree &&Arg)
   ^
/usr/lib/llvm-3.6/include/llvm/IR/Dominators.h:77:3: note:   no known conversion for argument 1 from ‘llvm::Function’ to ‘llvm::DominatorTree&&’
/usr/lib/llvm-3.6/include/llvm/IR/Dominators.h:75:3: note: llvm::DominatorTree::DominatorTree()
   DominatorTree() : DominatorTreeBase<BasicBlock>(false) {}
   ^
/usr/lib/llvm-3.6/include/llvm/IR/Dominators.h:75:3: note:   candidate expects 0 arguments, 1 provided
make[2]: *** [worklist-ai/CMakeFiles/worklistAI.dir/worklistai.cpp.o] Error 1
make[1]: *** [worklist-ai/CMakeFiles/worklistAI.dir/all] Error 2
make: *** [all] Error 2

It looks like the function DominatorTree is being used incorrectly. So I replace "DominatorTree &dt = DominatorTree(*f);" by
"DominatorTree &dt = getAnalysis(*f).getDomTree();" in the worklistai.cpp. Then it works, the command “make” can be run through. But when I use the libworklistAI.so built to run the cases in the directory test, it does not work, and reports the following errors.

guisen@ubuntu:~/source/intAbs/src/build$ make
Scanning dependencies of target worklistAI
[ 16%] Building CXX object worklist-ai/CMakeFiles/worklistAI.dir/worklistai.cpp.o
Linking CXX shared module libworklistAI.so
[100%] Built target worklistAI
guisen@ubuntu:~/source/intAbs/src/build$ cd ../test/
guisen@ubuntu:~/source/intAbs/src/test$ ./run.sh test1
Testing test1
/usr/lib/llvm-3.6/bin/clang -emit-llvm -S -c main.c
/usr/bin/time -f %e -o box_ncomb_nonpri.time /usr/lib/llvm-3.6/bin/opt -load /home/guisen/source/intAbs/src/build/worklist-ai/libworklistAI.so -worklist-ai  -nocombs -box main.ll >main_out.bc 2>box_ncomb_nonpri.out
Tue Dec 14 23:35:05 PST 2021
139
[ERROR]: opt (box ncomb)
ERROR: get_num_errs(): error string not found in output
TEST PASSED: box_ncomb_nonpri
/usr/bin/time -f %e -o box_ncomb_pri.time /usr/lib/llvm-3.6/bin/opt -load /home/guisen/source/intAbs/src/build/worklist-ai/libworklistAI.so -worklist-ai  -nocombs -priority -box main.ll >main_out.bc 2>box_ncomb_pri.out
Tue Dec 14 23:35:05 PST 2021
139
[ERROR]: opt (box ncomb)
ERROR: get_num_errs(): error string not found in output
TEST PASSED: box_ncomb_pri

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions