Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory related mutation operators are not supported #828

Open
dmc1778 opened this issue Jan 8, 2021 · 1 comment
Open

Memory related mutation operators are not supported #828

dmc1778 opened this issue Jan 8, 2021 · 1 comment

Comments

@dmc1778
Copy link

dmc1778 commented Jan 8, 2021

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 dmc1778 changed the title Memory related mutation operatos are not supported Memory related mutation operators are not supported Jan 8, 2021
@AlexDenisov
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants