add another test for invalid small region frees
parent
fe85116891
commit
bde8c3c29b
|
@ -12,6 +12,7 @@ all: \
|
||||||
invalid_free_protected \
|
invalid_free_protected \
|
||||||
invalid_free_unprotected \
|
invalid_free_unprotected \
|
||||||
invalid_free_small_region \
|
invalid_free_small_region \
|
||||||
|
invalid_free_small_region_far \
|
||||||
uninitialized_free \
|
uninitialized_free \
|
||||||
uninitialized_realloc \
|
uninitialized_realloc \
|
||||||
uninitialized_malloc_usable_size \
|
uninitialized_malloc_usable_size \
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue