Some implementation could add canaries after free failling the test.
* tests/test-explicit_bzero.c (test_heap): Handle implementations of
free() that overwrite the memory with canaries.
Signed-off-by: Bastien Roucariès <rouca@debian.org>
+2020-04-13 Bastien Roucariès <rouca@debian.org>
+
+ explicit_bzero tests: Fix test failure on OpenBSD 6.5.
+ * tests/test-explicit_bzero.c (test_heap): Handle implementations of
+ free() that overwrite the memory with canaries.
+
2020-04-13 Akim Demaille <akim@lrde.epita.fr>
bootstrap: recommend git submodule update --init
free (heapbuf);
if (is_range_mapped (addr, addr + SECRET_SIZE))
{
- ASSERT (memcmp (zero, heapbuf, SECRET_SIZE) == 0);
+ /* some implementation could override freed memory by canaries so
+ compare against secret */
+ ASSERT (memcmp (heapbuf, SECRET, SECRET_SIZE) != 0);
printf ("test_heap: address range is still mapped after free().\n");
}
else