mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-12-18 04:14:23 -05:00
Make the testsuite work for read-after-free
This commit makes the testsuite fail if the read-after-free tests are failing, instead of simply printing some info.
This commit is contained in:
parent
2d56c1de01
commit
ffdf7b1ee1
@ -13,6 +13,9 @@ OPTNONE int main(void) {
|
|||||||
free(p);
|
free(p);
|
||||||
for (size_t i = 0; i < 128 * 1024; i++) {
|
for (size_t i = 0; i < 128 * 1024; i++) {
|
||||||
printf("%x\n", p[i]);
|
printf("%x\n", p[i]);
|
||||||
|
if (p[i] != '\0') {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,9 @@ OPTNONE int main(void) {
|
|||||||
free(p);
|
free(p);
|
||||||
for (size_t i = 0; i < 16; i++) {
|
for (size_t i = 0; i < 16; i++) {
|
||||||
printf("%x\n", p[i]);
|
printf("%x\n", p[i]);
|
||||||
|
if (p[i] != '\0') {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user