MPI-SWS/genmc

malloc + pthread_mutex_init does not seem to work

JonasOberhauser opened this issue · 1 comments

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

typedef struct {
  pthread_mutex_t m;
} lock;

int main(void) 
{
 lock *t = malloc(sizeof(lock));
 pthread_mutex_init(&t->m, NULL);
 pthread_mutex_lock(&t->m);
 return 0;
}

Considered access to uninitialized memory

This is fixed in v0.6.