Example

Sanitizers/asan.c

#include <stdlib.h>
int asan(int argc, char* argv[])
{
char* x = calloc(10, sizeof(char*));
Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *'
Memory is allocated
Result of 'calloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'char *'
free(x);
Memory is released
return x[5];
Use of memory after it is freed
Use of memory after it is freed
}