add another test for invalid small region frees

This commit is contained in:
Daniel Micay 2018-08-24 05:09:33 -04:00
parent fe85116891
commit bde8c3c29b
2 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,7 @@ all: \
invalid_free_protected \
invalid_free_unprotected \
invalid_free_small_region \
invalid_free_small_region_far \
uninitialized_free \
uninitialized_realloc \
uninitialized_malloc_usable_size \

View File

@ -0,0 +1,12 @@
#include <stdlib.h>
__attribute__((optimize(0)))
int main(void) {
char *p = malloc(16);
if (!p) {
return 1;
}
char *q = p + 1024 * 1024 * 1024;
free(q);
return 0;
}