-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Basic Info
- Commit: 0f2a44d (currently dev)
- Input file:
int main() {
int* i = (int*) malloc(sizeof(int));
*i = 42;
int* i2 = (int*) malloc(sizeof(int));
memcpy(i2, i, sizeof(int));
assert(*i2 == 42);
float* f1 = (float*) malloc(sizeof(float));
*f1 = 44.0;
return 0;
}
- Settings: settings.txt
- Toolchain: toolchain.txt
- Logs: violation-log.txt, holds-log.txt
Description
Given the following program, I would assume that both asserts hold, however Ultimate reports that assert(i2 == 42) can be violated.
What's interesting is the fact, that Ultimate reports that this assert(*i2 == 42) holds, if the malloc of the floating point is removed.
I assume that this problem might be related to the fact, that the floating point allocation introduces the #memory_real map into the Boogie code, which then leads to #Ultimate.C_memcpy writing to #memory_int and #memory_real.
Reactions are currently unavailable