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

With dbg.full-output off: Combination of ana.malloc.unique_address_count >= 2 &threadid analysis deactivated unsound #1388

Closed
michael-schwarz opened this issue Mar 11, 2024 · 2 comments · Fixed by #1390
Assignees
Milestone

Comments

@michael-schwarz
Copy link
Member

// PARAM: --set ana.malloc.unique_address_count 2 --set ana.activated[-] threadid

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

mlist *head;

int insert_list(mlist *l){
  l = (mlist*)malloc(sizeof(mlist));
  l->next = head;

  head = l;
  return 0;
}

int main(void){
  mlist *mylist;
  insert_list(mylist);
  insert_list(mylist);

  while(head!=((void *)0)) {
    head = head->next;
  }

  __goblint_check(1);
}

The analysis claims here that the while loop is never left. Deactivating either option means the analysis succeeds.

@michael-schwarz
Copy link
Member Author

I tried to add --enable dbg.full-output to understand what's going on. Turn out this fixes the problem!

This seems to be some sort of regression of #1312 ?!

@michael-schwarz michael-schwarz changed the title Combination of ana.malloc.unique_address_count >= 2 &threadid analysis deactivated unsound With dbg.full-output off: Combination of ana.malloc.unique_address_count >= 2 &threadid analysis deactivated unsound Mar 11, 2024
@sim642
Copy link
Member

sim642 commented Mar 12, 2024

That's definitely odd. Are the uniqueness counters looking at the variable name somewhere then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants