mull icon indicating copy to clipboard operation
mull copied to clipboard

Memory related mutation operators are not supported

Open dmc1778 opened this issue 5 years ago • 1 comments

Current release of mull does not support memory related mutation operators for C. A set of memory operators are:

  1. removing null assignment statements
free (ptr);
ptr = NULL;

changes to

free (ptr);
ptr;
  1. zero allocation fault
int ptr = malloc(10*sizeof(int)); >> int num = malloc (0);

changes to

int num = malloc (0);
  1. replacing memory allocation with NULL
int ptr = malloc (4*sizeof(int)); >> int ptr = NULL;

changes to

int ptr = NULL;
  1. removing free(ptr); statement to inject dangling pointer vulnerability

dmc1778 avatar Jan 08 '21 13:01 dmc1778

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).

AlexDenisov avatar Jan 09 '21 15:01 AlexDenisov