malloc: Run tests without calling mallopt [BZ #19469]
The compiled tests no longer refer to the mallopt symbol from their main functions. (Some tests still call mallopt explicitly, which is fine.)
This commit is contained in:
parent
533f9bebf9
commit
f690b56979
|
@ -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-02 Andrew Senkevich <andrew.senkevich@intel.com>
|
2016-08-02 Andrew Senkevich <andrew.senkevich@intel.com>
|
||||||
|
|
||||||
[BZ #20033]
|
[BZ #20033]
|
||||||
|
|
|
@ -166,3 +166,7 @@ $(objpfx)libmemusage.so: $(libdl)
|
||||||
|
|
||||||
# Extra dependencies
|
# Extra dependencies
|
||||||
$(foreach o,$(all-object-suffixes),$(objpfx)malloc$(o)): arena.c hooks.c
|
$(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
|
||||||
|
|
|
@ -346,8 +346,10 @@ main (int argc, char *argv[])
|
||||||
unsigned int timeoutfactor = 1;
|
unsigned int timeoutfactor = 1;
|
||||||
pid_t termpid;
|
pid_t termpid;
|
||||||
|
|
||||||
|
#ifndef TEST_NO_MALLOPT
|
||||||
/* Make uses of freed and uninitialized memory known. */
|
/* Make uses of freed and uninitialized memory known. */
|
||||||
mallopt (M_PERTURB, 42);
|
mallopt (M_PERTURB, 42);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STDOUT_UNBUFFERED
|
#ifdef STDOUT_UNBUFFERED
|
||||||
setbuf (stdout, NULL);
|
setbuf (stdout, NULL);
|
||||||
|
|
Loading…
Reference in New Issue