From c50d06bc6a31f2601ef5302832bcd9776dbd4eb0 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 3 Jan 2022 21:23:14 -0500 Subject: [PATCH] comment explaining XOR for 8 byte overflow test --- test/simple-memory-corruption/overflow_small_8_byte.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/simple-memory-corruption/overflow_small_8_byte.c b/test/simple-memory-corruption/overflow_small_8_byte.c index 54c0de2..8b462a0 100644 --- a/test/simple-memory-corruption/overflow_small_8_byte.c +++ b/test/simple-memory-corruption/overflow_small_8_byte.c @@ -8,6 +8,7 @@ OPTNONE int main(void) { return 1; } size_t size = malloc_usable_size(p); + // XOR is used to avoid the test having a 1/256 chance to fail *(p + size + 7) ^= 1; free(p); return 0;