mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-05-13 15:13:36 +00:00
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.
This commit is contained in:
committed by
Bruno Haible
parent
aa0bbfd233
commit
1a72950760
@@ -1,3 +1,12 @@
|
||||
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
|
||||
|
||||
@@ -38,7 +38,10 @@ main (int argc, char **argv)
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user