Skip to content
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 incorrect result in no-overflow tasks #1501

Open
DrMichaelPetter opened this issue Jun 4, 2024 · 1 comment
Open

SV-Comp incorrect result in no-overflow tasks #1501

DrMichaelPetter opened this issue Jun 4, 2024 · 1 comment
Labels
bug sv-comp SV-COMP (analyses, results), witnesses unsound
Milestone

Comments

@DrMichaelPetter
Copy link
Collaborator

Straight from no-overflow  on ldv-regression/test_overflow.i ; we are not flagging any overflow here.

#include <stdlib.h>
#include <stdio.h>

void __blast_assert()
{
 ERROR: {reach_error();abort();}
}

ssize_t getService();
int globalSize;

int
main(int argc, char* argv[]) {
 long int retVal;
 retVal = getService();
 ((sizeof(retVal)==globalSize) ? (0) : __blast_assert ());
 printf("returned value: %ld\n", retVal);
 return 0;
}

ssize_t getService() {
 ssize_t localVar = 999999999999;
 globalSize = sizeof(localVar);
 printf("localVar: %zd\n", localVar);
 return localVar;
}

Correct me if I am wrong, but I thought that ssize_t localVar = 999999999999; is the culprit on 32bit architectures. However, we do not flag an overflow even on

//SKIP PARAM: --sets  exp.architecture 32bit  --set ana.specification "CHECK( init(main()), LTL(G ! overflow) )" --conf conf/svcomp22.json

#include <sys/types.h>

int main(){
    ssize_t a = 999999999999; // WARN
    return a?0:1;
}

If we let gcc -Wall -c -m32 test.c try with this minimal example, it flags the overflow in that line. Is this what the sv-comp task would require us to do, too?

@DrMichaelPetter DrMichaelPetter added bug unsound sv-comp SV-COMP (analyses, results), witnesses labels Jun 4, 2024
@sim642
Copy link
Member

sim642 commented Jun 4, 2024

exp.architecture only applies to preprocessing (which isn't used in SV-COMP anyway) right now. If this is based on 32bit architecture, then it's just another instance of #54 revealing itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug sv-comp SV-COMP (analyses, results), witnesses unsound
Projects
None yet
Development

No branches or pull requests

2 participants