mull
mull copied to clipboard
Memory related mutation operators are not supported
Current release of mull does not support memory related mutation operators for C. A set of memory operators are:
- removing null assignment statements
free (ptr);
ptr = NULL;
changes to
free (ptr);
ptr;
- zero allocation fault
int ptr = malloc(10*sizeof(int)); >> int num = malloc (0);
changes to
int num = malloc (0);
- replacing memory allocation with NULL
int ptr = malloc (4*sizeof(int)); >> int ptr = NULL;
changes to
int ptr = NULL;
- removing
free(ptr);statement to inject dangling pointer vulnerability
I'm not 100% sure about the first one, but the rest can definitely be implemented with Mull. I guess it makes sense to refer to the paper that proposes these operators: Mutation testing of memory-related operators (as pointed out by @nimashiri).