Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make tests/make: migrate to jemalloc > 100
details: https://anonhg.NetBSD.org/src/rev/72972fb5114a
branches: trunk
changeset: 1026750:72972fb5114a
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Dec 05 14:57:36 2021 +0000
description:
tests/make: migrate to jemalloc > 100
When I started working on usr.bin/make in 2020, I used NetBSD 8, which
used jemalloc 100.
After updating to NetBSD 8 to 9.99.x, the debugging options for jemalloc
stopped working since MALLOC_OPTIONS had been replaced with MALLOC_CONF
in 2019.
Enable malloc debugging again, to reliably reproduce the use-after-free
for the variable modifier ':@'.
diffstat:
usr.bin/make/test-variants.sh | 4 ++--
usr.bin/make/unit-tests/Makefile | 4 ++--
usr.bin/make/unit-tests/export.mk | 4 ++--
usr.bin/make/unit-tests/opt-file.mk | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diffs (73 lines):
diff -r f83096b91f5f -r 72972fb5114a usr.bin/make/test-variants.sh
--- a/usr.bin/make/test-variants.sh Sun Dec 05 14:25:04 2021 +0000
+++ b/usr.bin/make/test-variants.sh Sun Dec 05 14:57:36 2021 +0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: test-variants.sh,v 1.12 2021/09/12 10:28:40 rillig Exp $
+# $NetBSD: test-variants.sh,v 1.13 2021/12/05 14:57:36 rillig Exp $
#
# Build several variants of make and run the tests on them.
#
@@ -30,7 +30,7 @@
&& env -i PATH="$PATH" USETOOLS="no" "$@" \
sh -ce "make -ks -j6 dependall" \
&& size *.o make \
- && env -i PATH="$PATH" USETOOLS="no" MALLOC_OPTIONS="JA" \
+ && env -i PATH="$PATH" USETOOLS="no" MALLOC_CONF="junk:true" \
_MKMSG_TEST=":" "$@" \
sh -ce "make -s test" \
|| fail
diff -r f83096b91f5f -r 72972fb5114a usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Sun Dec 05 14:25:04 2021 +0000
+++ b/usr.bin/make/unit-tests/Makefile Sun Dec 05 14:57:36 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.284 2021/10/19 15:59:26 sjg Exp $
+# $NetBSD: Makefile,v 1.285 2021/12/05 14:57:36 rillig Exp $
#
# Unit tests for make(1)
#
@@ -651,7 +651,7 @@
x!= echo; mkdir -p ${TMPDIR}
.endif
-MAKE_TEST_ENV?= MALLOC_OPTIONS="JA" # for jemalloc
+MAKE_TEST_ENV?= MALLOC_CONF="junk:true" # for jemalloc
MAKE_TEST_ENV+= TMPDIR=${TMPDIR}
.if ${.MAKE.OS} == "NetBSD"
diff -r f83096b91f5f -r 72972fb5114a usr.bin/make/unit-tests/export.mk
--- a/usr.bin/make/unit-tests/export.mk Sun Dec 05 14:25:04 2021 +0000
+++ b/usr.bin/make/unit-tests/export.mk Sun Dec 05 14:57:36 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: export.mk,v 1.10 2020/10/24 08:50:17 rillig Exp $
+# $NetBSD: export.mk,v 1.11 2021/12/05 14:57:36 rillig Exp $
UT_TEST= export
UT_FOO= foo${BAR}
@@ -40,7 +40,7 @@
.MAKE.EXPORTED+= UT_ZOO UT_TEST
-FILTER_CMD?= egrep -v '^(MAKEFLAGS|MALLOC_OPTIONS|PATH|PWD|SHLVL|_|&)='
+FILTER_CMD?= egrep -v '^(MAKEFLAGS|MALLOC_.*|PATH|PWD|SHLVL|_|&)='
all:
@env | ${FILTER_CMD} | sort
diff -r f83096b91f5f -r 72972fb5114a usr.bin/make/unit-tests/opt-file.mk
--- a/usr.bin/make/unit-tests/opt-file.mk Sun Dec 05 14:25:04 2021 +0000
+++ b/usr.bin/make/unit-tests/opt-file.mk Sun Dec 05 14:57:36 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-file.mk,v 1.12 2021/04/04 10:13:09 rillig Exp $
+# $NetBSD: opt-file.mk,v 1.13 2021/12/05 14:57:36 rillig Exp $
#
# Tests for the -f command line option.
@@ -19,7 +19,7 @@
# outside of the file buffer.
#
# printf '%s' 'VAR=value\' \
-# | MALLOC_OPTIONS=JA make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \
+# | MALLOC_CONF="junk:true" make-2014.01.01.00.00.00 -r -f - -V VAR -dA 2>&1 \
# | less
#
# The debug output shows how make happily uses freshly allocated memory (the
Home |
Main Index |
Thread Index |
Old Index