mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-19 22:50:31 -04:00
Move memory corruption tests up a directory
This commit is contained in:
parent
0bbcc5d610
commit
84eadd8568
42 changed files with 83 additions and 140 deletions
16
test/write_after_free_large_reuse.c
Normal file
16
test/write_after_free_large_reuse.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "test_util.h"
|
||||
#include "../util.h"
|
||||
|
||||
OPTNONE int main(void) {
|
||||
char *p = malloc(256 * 1024);
|
||||
if (!p) {
|
||||
return 1;
|
||||
}
|
||||
free(p);
|
||||
UNUSED char *q = malloc(256 * 1024);
|
||||
p[64 * 1024 + 1] = 'a';
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue