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

Unsoundness on SV-COMP for No-Overflow & Memory Properties #1385

Closed
4 tasks done
michael-schwarz opened this issue Mar 10, 2024 · 4 comments · Fixed by #1574
Closed
4 tasks done

Unsoundness on SV-COMP for No-Overflow & Memory Properties #1385

michael-schwarz opened this issue Mar 10, 2024 · 4 comments · Fixed by #1574
Labels
bug sv-benchmarks-MR This tracks an MR in the`sv-benchmarks` repo that will solve issue sv-comp SV-COMP (analyses, results), witnesses unsound
Milestone

Comments

@michael-schwarz
Copy link
Member

michael-schwarz commented Mar 10, 2024

Noticed during benchmarking of #1354 but already present on master at 8c485c9

No-Overflow

Mem-Safety

Mem-Cleanup

@sim642
Copy link
Member

sim642 commented Mar 11, 2024

The test_overflow.i task wasn't in SV-COMP 2024 as such: at that sv-benchmarks repo tag, it didn't have a no-overflow property. This was added later in https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks/-/merge_requests/1526 to fix https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks/-/issues/1405.

Since the task actually is specific to 32bit, but we use the current machine's CIL Machdep for everything, we'll be wrong. Therefore, we'll have to finally implement #54, there's no way around it anymore. It's surprising that SV-COMP hasn't had an overflow task specifically to check the 32bit vs 64bit difference.

I didn't check the others, but they could also be tasks that were excluded from SV-COMP 2024 due to last-minute modifications.

@michael-schwarz
Copy link
Member Author

michael-schwarz commented Mar 11, 2024

For at least one of the mem-cleanup issues, there is another separate problem from what #1354 fixes for the relational analyses:

// PARAM: --set ana.malloc.unique_address_count 2 --enable ana.autotune.enabled --set ana.autotune.activated  "['singleThreaded']"

typedef struct list {
 int key;
 struct list *next;
} mlist;

mlist *head;

mlist* search_list(mlist *l, int k){
  l = head;
  while(l!=((void *)0) && l->key!=k) {
    l = l->next;
  }
  return l;
}

int insert_list(mlist *l, int k){
  l = (mlist*)malloc(sizeof(mlist));
  l->key = k;
  if (head==((void *)0)) {
    l->next = ((void *)0);
  } else {
    l->key = k;
    l->next = head;
  }
  head = l;
  return 0;
}

int main(void){
  mlist *mylist;
  insert_list(mylist,2);
  insert_list(mylist,5);

  search_list(head,2);

  __goblint_check(1);
}

In this config, the analysis claims that search_list does not return.

@michael-schwarz
Copy link
Member Author

Other than the No-Overflow for which Simmo described the issue above, the other three are fixed when setting --enable dbg.full-output and are thus regressions of #1312 (see #1388).

@sim642 sim642 added this to the SV-COMP 2025 milestone Mar 12, 2024
@sim642 sim642 reopened this Oct 2, 2024
@sim642
Copy link
Member

sim642 commented Oct 9, 2024

According to SV-COMP community meeting discussion and decision, we are right on test_overflow: https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks/-/merge_requests/1552.

@sim642 sim642 added the sv-benchmarks-MR This tracks an MR in the`sv-benchmarks` repo that will solve issue label Oct 9, 2024
@sim642 sim642 closed this as completed Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug sv-benchmarks-MR This tracks an MR in the`sv-benchmarks` repo that will solve issue sv-comp SV-COMP (analyses, results), witnesses unsound
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants