mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
fix various false positives in test-stress from valgrind
This commit is contained in:
parent
c61b365e76
commit
a1f5a5d962
6 changed files with 50 additions and 36 deletions
|
@ -16,17 +16,20 @@ int main(int argc, char** argv) {
|
|||
mi_free(r);
|
||||
|
||||
// undefined access
|
||||
// printf("undefined: %d\n", *q);
|
||||
printf("undefined: %d\n", *q);
|
||||
|
||||
*q = 42;
|
||||
|
||||
// buffer overflow
|
||||
// q[1] = 43;
|
||||
q[1] = 43;
|
||||
|
||||
// buffer underflow
|
||||
q[-1] = 44;
|
||||
|
||||
mi(free)(q);
|
||||
|
||||
// double free
|
||||
// mi(free)(q);
|
||||
mi(free)(q);
|
||||
|
||||
// use after free
|
||||
printf("use-after-free: %d\n", *q);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue