about summary refs log tree commit diff
path: root/malloc/Makefile
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2012-09-05 21:49:00 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2012-09-05 21:49:30 +0530
commit6ef9cc37f0ea151a54e5c8a19950a6d5b6ff8a96 (patch)
tree7dfbbb3bbdde79ba6bc06a209102c988c53e6e1c /malloc/Makefile
parent4d038ae3163aba04218b05f3983473b25c943b8b (diff)
downloadglibc-6ef9cc37f0ea151a54e5c8a19950a6d5b6ff8a96.tar.gz
glibc-6ef9cc37f0ea151a54e5c8a19950a6d5b6ff8a96.tar.xz
glibc-6ef9cc37f0ea151a54e5c8a19950a6d5b6ff8a96.zip
Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0
[BZ #1349]

malloc_usable_size returns the usable size in an allocated chunk,
which may be >= the requested size. In the case of MALLOC_CHECK_ being
exported to > 0 however, only the requested size is usable, since a
magic value is written at the end of the request size to trap writes
beyond request bounds. Hence, when MALLOC_CHECK_ is exported to > 0,
malloc_usable_size() should return the request size.
Diffstat (limited to 'malloc/Makefile')
-rw-r--r--malloc/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 5d6d716a78..55c675b2cd 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -1,5 +1,4 @@
-# Copyright (C) 1991-2003, 2005, 2006, 2007, 2009, 2011, 2012
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +25,7 @@ all:
 dist-headers := malloc.h
 headers := $(dist-headers) obstack.h mcheck.h
 tests := mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \
-	 tst-mallocstate tst-mcheck tst-mallocfork tst-trim1
+	 tst-mallocstate tst-mcheck tst-mallocfork tst-trim1 tst-malloc-usable
 test-srcs = tst-mtrace
 
 routines = malloc morecore mcheck mtrace obstack
@@ -116,6 +115,7 @@ endif
 endif
 
 tst-mcheck-ENV = MALLOC_CHECK_=3
+tst-malloc-usable-ENV = MALLOC_CHECK_=3
 
 CPPFLAGS-malloc.c += -DPER_THREAD
 # Uncomment this for test releases.  For public releases it is too expensive.