1

Im trying to set up Klee for a project and Im running into difficulties when testing coreutils as per http://klee.llvm.org/TestingCoreutils.html

src$ $KLEE cut.bc
'main' function not found in module.
*** glibc detected *** /home/klee/Development//klee-build/Debug+Asserts/bin/klee:    double free or corruption (!prev): 0x0000000003a79850 ***

The problem is most likely with the llvm build itself, not Klee, because when I dissasemble the .bc files with llvm-dis, only the module ID is there, no actual code

Looking at the build output, what strikes me as odd is this:

Potential incompatible plugin version. GCC: 4.6 (20120301). Expected: 4.6 (20120301)
Defines 'dragonegg_disable_version_check' as env variable to remove this warning
Please note that unexpected errors might occur.

Any ideas are appreaciated.

Filip
  • 2,285
  • 1
  • 19
  • 24
  • What is your llvm version and how did you build cut.bc? – bitmask Jun 02 '12 at 20:03
  • I built everything following the steps in the link (http://klee.llvm.org/TestingCoreutils.html), so `../configure --disable-nls CFLAGS="-g"`, `make CC=/path/to/klee-gcc`. LLVM is 3.0. – Filip Jun 02 '12 at 20:07

1 Answers1

2

The problem is with your LLVM version. KLEE is not yet compatible with llvm3.0 or later. Try building one of llvm 2.7 .. 2.9.

bitmask
  • 32,434
  • 14
  • 99
  • 159
  • Oh, it looks like you are right. I ll go do that. One question: why is the disassembled file almost empty? – Filip Jun 02 '12 at 20:16
  • @Filip: My guess: You compile with `klee-gcc` which in turn uses `llvm-gcc` which is not installed on your system (well not properly), as it isn't available for llvm > 2.9. – bitmask Jun 02 '12 at 20:18