jemalloc: skip extent test with profiling enabled (#540203)

This commit is contained in:
Emily
2026-07-13 19:33:20 +00:00
committed by GitHub
2 changed files with 32 additions and 0 deletions

View File

@@ -51,6 +51,14 @@ stdenv.mkDerivation (finalAttrs: {
# `rtree_read.constprop.0` shows up in some builds but
# not others, so we fall back to O2:
./o3-to-o2.patch
# Active profiling may make xallocx decline to grow non-page-aligned
# allocations, so test/integration/extent can observe decommit without
# the matching commit on platforms with real decommit/commit.
#
# A (longer) patch addressing the failure posted upstream at:
# https://github.com/jemalloc/jemalloc/pull/2954
./skip-extent-test-with-prof-active.patch
];
nativeBuildInputs = [

View File

@@ -0,0 +1,24 @@
diff --git a/test/integration/extent.sh b/test/integration/extent.sh
index 39fb0a73..ee9f3ed4 100644
--- a/test/integration/extent.sh
+++ b/test/integration/extent.sh
@@ -1,5 +1,19 @@
#!/bin/sh
+# With active profiling, xallocx may decline to grow non-page-aligned
+# allocations. On platforms with real decommit/commit, this can make this
+# test observe a successful decommit without the matching commit.
+case ",${MALLOC_CONF_ALL}," in
+ *,prof:true,*)
+ case ",${MALLOC_CONF_ALL}," in
+ *,prof_active:false,*)
+ ;;
+ *)
+ return 1
+ ;;
+ esac
+esac
+
if [ "x${enable_fill}" = "x1" ] ; then
export MALLOC_CONF="junk:false"
fi