Yesterday I asked question on stackoverflow, but I have not described it clearly, so I change the way to ask, maybe make the problem clear.
First, I modify the example get_sign.c which the klee provide, I include the unistd.h
in the program, and call the function sleep()
to make the thread pause, as follows
/*
* First KLEE tutorial: testing a small function
*/
#include <unistd.h>
int get_sign(int x) {
if (x == 0)
return 0;
if (x < 0)
return -1;
else
return 1;
}
int main() {
int a;
klee_make_symbolic(&a, sizeof(a), "a");
sleep(10);
return get_sign(a);
}
I use the "llvm-gcc
" compile the get_sign.c, then use klee get_sign.o
to execute the objectfile, the thread do not pause, means the sleep()
does not work.
so I add a argument when I execute the get_sign.o, like this klee --libc=uclibc get_sign.o
, unfortunately, the thread still don't suspend, moreover, the klee reports a error,
KLEE: ERROR: /home/lab/work/klee-uclibc/libc/signal/sigaction.c:58: failed external call: __syscall_rt_sigaction
KLEE: NOTE: now ignoring this error at this location
What can I do to solve this problem? thank you!