Open guaguagou opened 4 years ago
KLEE: ERROR: /home/user/klee/DataVolumeContainer/hyperg_1F1.c:977: overflow on unsigned multiplication
KLEE: NOTE: now ignoring this error at this location
hyperg_1F1(-1,-2147483648,1.67772e+07)=1.007812500000000000e+00
KLEE: ERROR: /home/user/klee/DataVolumeContainer/hyperg_1F1.c:967: overflow on unsigned addition
KLEE: NOTE: now ignoring this error at this location
gsl: exp.c:113: ERROR: underflow
gsl: gamma.c:1227: ERROR: error
KLEE: WARNING ONCE: flushing 4104 bytes on read, may be slow and/or crash: MO255[4104] allocated at global:fact_table
gsl: gamma.c:769: ERROR: error
Default GSL error handler invoked.
Default GSL error handler invoked.
Default GSL error handler invoked.
gsl: exp.c:113: ERROR: underflow
hyperg_1F1(-2,-204472320,124)=1.000001212878472767e+00
Looking at your logs, I can see that your code invokes sin
and cos
with a symbolic argument:
KLEE: WARNING ONCE: calling external: sin((FAbs w64 (ReadLSB w64 0 x)))
KLEE: WARNING ONCE: calling external: cos((FAbs w64 (ReadLSB w64 0 x)))
If you want to reason symbolically about these functions, you have two options:
1) Link with an implementation of these functions
or
2) Represent them as operands in the expression language, as we do for instance for FAbs
(which you can see in the expressions above)
Option 1 means I should use wllvm to recompile the uclibc to the llvm bitcode(.bca), right?
Because when I use -libc=uclibc
and -libm
options, klee can't find sin() and cos() functions.
@guaguagou yes. You would need to reconfigure it first to make sure the implementations for these functions are included. You should also make sure uclibc provides these functions, but I assume it does.
Hello, I am trying to use klee-float to generate test cases for bessel_J0.c in gsl. But when calling the external function cos (), klee hangs.
Compiled as follows:
clang -I ../include -I gsl-2.6 -emit-llvm -fsanitize=signed-integer-overflow -fsanitize=unsigned-integer-overflow -c -g -O0 bessel_J0.c
Run as follows:
The file:
Then I used the same method to test Hypergeometric Functions hyperg_1F1.c in gsl. An overflow error has occurred and hangs again after running for a long time.
main: