我是一个尝试使用KLEE的初学者。 我正在使用KLEE自包含软件包在 使用pthreads的C++程序上。 我已经生成.o文件,并使用KLEE使用下列选项使用pthreads的C++代码的KLEE
klee --libc=uclibc --posix-runtime test.o
但我知道我得到警告
KLEE: NOTE: Using model:
/home/pgbovine/klee/Release+Asserts/lib/libkleeRuntimePOSIX.bca
KLEE: output directory = "klee-out-4"
KLEE: WARNING: undefined reference to function: klee_get_valuel
KLEE: WARNING: undefined reference to function: pthread_create
KLEE: WARNING: undefined reference to function: pthread_exit
KLEE: WARNING: undefined reference to function: pthread_join
KLEE: WARNING: executable has module level assembly (ignoring)
KLEE: WARNING: calling external: syscall(54, 0, 21505, 571522624)
KLEE: WARNING: calling __user_main with extra arguments.
KLEE: WARNING: calling external: pthread_create(571589384, 0, 563903904, 571574176)
0 klee 0x08965ab8
[pid 1846] +++ killed by SIGSEGV +++
+++ killed by SIGSEGV +++
Segmentation fault
在.BC文件使用克利也给了我同样的结果。
我不确定为什么我得到未定义的pthread函数参考。我是 不确定用于pthread的库是否正确使用。有 有办法确保这一点?使用llvm-ld也无济于事。
下面是我用
llvm-ld tests.bc -l=/usr/lib/libpthread.a
我不知道为什么会出现分段故障发生LLVM-ld命令。该程序的工作原理 罚款时,我正常编译程序g++
和运行 可执行文件。
有人能告诉我我要去哪里吗?