Move memory corruption tests up a directory

This commit is contained in:
jvoisin 2022-01-21 20:47:21 +01:00 committed by Daniel Micay
parent 0bbcc5d610
commit 84eadd8568
42 changed files with 83 additions and 140 deletions

View file

@ -0,0 +1,22 @@
#include <stdlib.h>
#include <string.h>
#include "test_util.h"
#include "../util.h"
OPTNONE int main(void) {
char *p = malloc(128);
if (!p) {
return 1;
}
free(p);
UNUSED char *q = malloc(128);
p[65] = 'a';
// trigger reuse of the allocation
for (size_t i = 0; i < 100000; i++) {
free(malloc(128));
}
return 0;
}