]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
cheri: malloc: disable capability narrowing on some tests
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 7 Oct 2022 15:05:29 +0000 (16:05 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 27 Oct 2022 13:46:55 +0000 (14:46 +0100)
malloc/tst-malloc-backtrace tests heap corruption.
malloc/tst-dynarray uses malloc_debug wrappers that access internals.

malloc/Makefile

index 4e32de2a0b6698cc929f0f0535b3bdf51d14d2bb..0d40188bc1c529cab198ff0b2a0a5aeac5eb741e 100644 (file)
@@ -88,6 +88,7 @@ tests-exclude-hugetlb1 = \
        tst-interpose-thread \
        tst-interpose-static-nothread \
        tst-interpose-static-thread \
+       tst-malloc-backtrace \
        tst-malloc-usable \
        tst-malloc-usable-tunables \
        tst-mallocstate
@@ -159,6 +160,8 @@ libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes))
 libc_malloc_debug-routines = malloc-debug $(sysdep_malloc_debug_routines)
 libc_malloc_debug-inhibit-o = $(filter-out .os,$(object-suffixes))
 
+tst-malloc-backtrace-ENV = GLIBC_TUNABLES=glibc.mem.cap_narrowing=0
+
 $(objpfx)tst-malloc-backtrace: $(shared-thread-library)
 $(objpfx)tst-malloc-thread-exit: $(shared-thread-library)
 $(objpfx)tst-malloc-thread-fail: $(shared-thread-library)
@@ -331,12 +334,14 @@ $(objpfx)tst-interpose-static-thread: \
   $(objpfx)tst-interpose-aux-thread.o $(static-thread-library)
 
 tst-dynarray-ENV = MALLOC_TRACE=$(objpfx)tst-dynarray.mtrace \
+                  GLIBC_TUNABLES=glibc.mem.cap_narrowing=0 \
                   LD_PRELOAD=$(objpfx)libc_malloc_debug.so
 $(objpfx)tst-dynarray-mem.out: $(objpfx)tst-dynarray.out
        $(common-objpfx)malloc/mtrace $(objpfx)tst-dynarray.mtrace > $@; \
        $(evaluate-test)
 
 tst-dynarray-fail-ENV = MALLOC_TRACE=$(objpfx)tst-dynarray-fail.mtrace \
+                       GLIBC_TUNABLES=glibc.mem.cap_narrowing=0 \
                        LD_PRELOAD=$(objpfx)libc_malloc_debug.so
 $(objpfx)tst-dynarray-fail-mem.out: $(objpfx)tst-dynarray-fail.out
        $(common-objpfx)malloc/mtrace $(objpfx)tst-dynarray-fail.mtrace > $@; \