Skip to content

Apron: Both branches dead after malloc #1489

@michael-schwarz

Description

@michael-schwarz

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)
    ;
}

Metadata

Metadata

Labels

bugrelationalRelational analyses (Apron, affeq, lin2var)unsound

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions