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

Apron: Both branches dead after malloc #1489

Closed
michael-schwarz opened this issue May 27, 2024 · 3 comments · Fixed by #1492
Closed

Apron: Both branches dead after malloc #1489

michael-schwarz opened this issue May 27, 2024 · 3 comments · Fixed by #1492
Assignees
Labels
bug relational Relational analyses (Apron, affeq, lin2var) unsound
Milestone

Comments

@michael-schwarz
Copy link
Member

In the epic saga of problems with both branches being dead in the relational analysis, we proudly present the next example:

// SKIP PARAM: --set ana.activated[+] apron  --set ana.relation.privatization mutex-meet --sets ana.apron.domain interval
// Checks that assinging to malloc'ed memory does not cause both branches to be dead
#include <pthread.h>

void nop(void* arg) {
}

void main() {
  pthread_t thread;
  pthread_create(&thread, 0, &nop, 0);

  long *k = malloc(sizeof(long));
  *k = 5;
  if (1)
    ;
}
@michael-schwarz michael-schwarz added bug unsound relational Relational analyses (Apron, affeq, lin2var) labels May 27, 2024
@michael-schwarz michael-schwarz self-assigned this May 27, 2024
@sim642
Copy link
Member

sim642 commented May 28, 2024

Isn't this also an issue for base's mutex-meet?

@michael-schwarz
Copy link
Member Author

It would seem like it should be, but it works without any issues for base.

@sim642
Copy link
Member

sim642 commented May 28, 2024

I guess base's existing logic for turning bottoms into tops is somehow covering this already.

@sim642 sim642 added this to the v2.4.0 milestone Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug relational Relational analyses (Apron, affeq, lin2var) unsound
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants