* tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var
is set then don't check ENOMEM is returned from realloc().
See https://sourceware.org/bugzilla/show_bug.cgi?id=27870
Note it doesn't suffice to unsetenv() this var within the program,
as the hooks have already been set up at that stage.
+2021-05-15 Pádraig Brady <P@draigBrady.com>
+
+ realloc-gnu: avoid glibc MALLOC_CHECK_ issue
+ * tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var
+ is set then don't check ENOMEM is returned from realloc().
+ See https://sourceware.org/bugzilla/show_bug.cgi?id=27870
+ Note it doesn't suffice to unsetenv() this var within the program,
+ as the hooks have already been set up at that stage.
+
2021-05-14 Paul Eggert <eggert@cs.ucla.edu>
c-stack: work around Solaris 11 bugs
size_t one = argc != 12345;
p = realloc (p, PTRDIFF_MAX + one);
ASSERT (p == NULL);
- ASSERT (errno == ENOMEM);
+ /* Avoid a test failure due to glibc bug
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=27870>. */
+ if (!getenv ("MALLOC_CHECK_"))
+ ASSERT (errno == ENOMEM);
}
free (p);