New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SV-COMP: unreach-call
failure in float-newlib/double_req_bl_0682a.c
#828
Comments
Minimizing this further is tricky, since optimizations can sometimes mask the issue. I've managed to trim it down to this file, which exhibits the same problem when run with #include <stdlib.h>
static double const pi = 3.1415926535897931160E+00;
double const arr[4] = { 0.0, 0.0, 1.0e300, -pi};
int main() {
if (arr[3] != -pi) {
abort();
}
return 0;
}
Or, if you prefer bitcode instead, this works with all optimization levels:
|
What's interesting is if I change the type of the array from having crucible/crucible-llvm/src/Lang/Crucible/LLVM/MemModel/Common.hs Lines 522 to 525 in 7942801
The three floating-point cases all hardcode the load address |
This change is sufficient to allow the [`float-newlib/double_req_bl_0682a.c`](https://github.com/sosy-lab/sv-benchmarks/blob/99d37c5b4072891803b9e5c154127c912477f705/c/float-newlib/double_req_bl_0682a.c) SV-COMP benchmark program to be verified. I have checked in a significantly minimized version of this program as a regression test. Fixes #828.
This change is sufficient to allow the [`float-newlib/double_req_bl_0682a.c`](https://github.com/sosy-lab/sv-benchmarks/blob/99d37c5b4072891803b9e5c154127c912477f705/c/float-newlib/double_req_bl_0682a.c) SV-COMP benchmark program to be verified. I have checked in a significantly minimized version of this program as a regression test. Fixes #828.
Good catch @RyanGlScott |
crux-llvm
incorrectly reports thatreach_error()
is reachable when simulating SV-COMP'sfloat-newlib/double_req_bl_0682a.c
program.float-newlib/double_req_bl_0682a.c
is quite a large program, so I've attempted to minimize it with C-Reduce:If I compile this with
clang test.c -O1 -o test && ./test
, it will return0
. If I run it throughcrux-llvm
, however, it fails to verify:The text was updated successfully, but these errors were encountered: