Something went wrong. Try again.
READ-ONLY MIRROR of the previous soteria repo
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455#include <stdlib.h>
int load(int *x){ return *x;}
int test_np_uninit(){ int *x = (int *)malloc(sizeof(int)); load(x); return 0;}
int test_uninit(){ int *x = (int *)malloc(sizeof(int)); if (!x) return 1; load(x); free(x); return 0;}
int test_leak(){ int *x = (int *)malloc(sizeof(int)); if (!x) return 1; *x = 12; load(x); return 0;}
int test_np(){ int *x = (int *)malloc(sizeof(int)); *x = 12; load(x); free(x); return 0;}
int test_ok(){ int *x = (int *)malloc(sizeof(int)); if (!x) return 1; *x = 12; load(x); free(x); return 0;}