aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--malloc/Makefile2
-rw-r--r--malloc/hooks.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index afcd296..857e2eb 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -72,7 +72,7 @@ test-srcs = tst-mtrace
# with MALLOC_CHECK_=3 because they expect a specific failure.
tests-exclude-mcheck = tst-mcheck tst-malloc-usable \
tst-interpose-nothread tst-interpose-static-nothread \
- tst-interpose-static-thread tst-malloc-too-large \
+ tst-interpose-static-thread \
tst-mxfast tst-safe-linking
# Run all tests with MALLOC_CHECK_=3
diff --git a/malloc/hooks.c b/malloc/hooks.c
index c91f950..8080c3f 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -321,7 +321,10 @@ realloc_check (void *oldmem, size_t bytes, const void *caller)
const INTERNAL_SIZE_T oldsize = chunksize (oldp);
if (!checked_request2size (rb, &chnb))
- goto invert;
+ {
+ __set_errno (ENOMEM);
+ goto invert;
+ }
__libc_lock_lock (main_arena.mutex);