Unknown
2010-05-25 22:13:05 UTC
Hi,
When I run the following simple program with KLEE:
------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv)
{
const size_t LEN = 10;
char *s = malloc(LEN);
klee_make_symbolic(s, LEN, "s");
if (strcmp(s, "world") != 0)
puts("different");
else
puts("same");
return 0;
}
------------------------------------------------------------------------
I expect to see that both branches are covered and to see at least
one occurrence of "different" and at least one occurrence of "same".
However, the lastest version of KLEE outputs:
------------------------------------------------------------------------
KLEE: output directory = "klee-out-0"
KLEE: WARNING: undefined reference to function: puts
KLEE: WARNING: undefined reference to function: strcmp
KLEE: WARNING: calling external: strcmp(146291400, 146271112)
KLEE: WARNING: calling external: puts(146271424)
different
KLEE: done: total instructions = 38
KLEE: done: completed paths = 1
KLEE: done: generated tests = 1
------------------------------------------------------------------------
Is this the expected behaviour, or a bug in KLEE, or a configuration
problem on my side?
Thanks,
When I run the following simple program with KLEE:
------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv)
{
const size_t LEN = 10;
char *s = malloc(LEN);
klee_make_symbolic(s, LEN, "s");
if (strcmp(s, "world") != 0)
puts("different");
else
puts("same");
return 0;
}
------------------------------------------------------------------------
I expect to see that both branches are covered and to see at least
one occurrence of "different" and at least one occurrence of "same".
However, the lastest version of KLEE outputs:
------------------------------------------------------------------------
KLEE: output directory = "klee-out-0"
KLEE: WARNING: undefined reference to function: puts
KLEE: WARNING: undefined reference to function: strcmp
KLEE: WARNING: calling external: strcmp(146291400, 146271112)
KLEE: WARNING: calling external: puts(146271424)
different
KLEE: done: total instructions = 38
KLEE: done: completed paths = 1
KLEE: done: generated tests = 1
------------------------------------------------------------------------
Is this the expected behaviour, or a bug in KLEE, or a configuration
problem on my side?
Thanks,
--
Seungbeom Kim
Seungbeom Kim