]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
malloc: Run tests without calling mallopt [BZ #19469]
authorFlorian Weimer <fweimer@redhat.com>
Tue, 2 Aug 2016 15:01:02 +0000 (17:01 +0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 27 Jan 2017 15:16:52 +0000 (13:16 -0200)
The compiled tests no longer refer to the mallopt symbol
from their main functions.  (Some tests still call mallopt
explicitly, which is fine.)

ChangeLog
malloc/Makefile
test-skeleton.c

index c5ad098e049dbf29a02fd64539e861abffec0703..dbdb77c54e57aacf9eab45ccbb66ccf2e67b8133 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-08-02  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #19469]
+       * malloc/Makefile (CPPFLAGS): Compile tests with
+       -DTEST_NO_MALLOPT.
+       * test-skeleton.c (main): Only call mallopt if !TEST_NO_MALLOPT.
+
 2016-08-03  Florian Weimer  <fweimer@redhat.com>
 
        [BZ #17730]
index 071f917960038a425a020d801f622c1d6598e5c0..6e19a4261204de4b902d710f66404cd36d7ff322 100644 (file)
@@ -158,3 +158,7 @@ $(objpfx)libmemusage.so: $(libdl)
 
 # Extra dependencies
 $(foreach o,$(all-object-suffixes),$(objpfx)malloc$(o)): arena.c hooks.c
+
+# Compile the tests with a flag which suppresses the mallopt call in
+# the test skeleton.
+$(tests:%=$(objpfx)%.o): CPPFLAGS += -DTEST_NO_MALLOPT
index 6a7fc429d4e344e5c7a6634ec73dfe0a5d6b0119..5f1b54396addfe650cefad8de62c4fd5d8d17865 100644 (file)
@@ -236,8 +236,10 @@ main (int argc, char *argv[])
   unsigned int timeoutfactor = 1;
   pid_t termpid;
 
+#ifndef TEST_NO_MALLOPT
   /* Make uses of freed and uninitialized memory known.  */
   mallopt (M_PERTURB, 42);
+#endif
 
 #ifdef STDOUT_UNBUFFERED
   setbuf (stdout, NULL);