[klee-dev] Running grep with klee

Dan Liew dan at su-root.co.uk
Wed Dec 28 10:04:37 GMT 2016


On 27 December 2016 at 13:11, Awanish <avanis1994 at gmail.com> wrote:
> Hi Everyone,
>
> I compiled grep source code with both llvm2.9 and  llvm-3.4, then try to run
> on corresponding klee. In both the cases output is same but not the desired
> one. LLVM ERROR: invalid argument to evalConstant().
>
> Anyone have Idea what I am doing wrong in this?

You're probably not doing anything wrong and this likely a bug in
KLEE. I encountered this problem when working on my own fork of KLEE
and it turned out the problem was vector constants.

I have support for vector instructions in my fork of KLEE but I have
not upstreamed the support yet for various reasons. I plan to upstream
support once all my existing PRs get accepted.

In your case you can see what is wrong by setting a break point on the
call to `llvm::report_fatal_error()` in gdb and when hitting it
running

```
call c->dump()
```

this will dump the LLVM constant that is not being handled.

HTH,
Dan.



More information about the klee-dev mailing list