jemalloc/test
Ihar Hrachyshka 7029edec97
test: handle profiled xallocx no-grow in extent test
With profiling active, xallocx may decline to grow an allocation that is
not page-aligned.  The profiling path can require sampled xallocx growth
to use page-aligned pointers; otherwise it can return the old usable
size without committing the purged tail.

Observed on Darwin, where decommit/commit are real VM state changes.
The shrink/purge half succeeds and records a decommit, then the
profiling-limited grow skips the matching commit.

This is not Darwin-specific.  Linux no-overcommit should expose the same
mismatch.  Usual Linux overcommit behavior papers it over by making
commit/decommit hooks report unsupported, so both sides of the old
equality check stay false.

Relax the default-path assertion only while profiling is active, and add
a page-aligned case that still requires xallocx shrink and grow to
succeed, preserving commit/merge coverage.

Assisted-by: Codex gpt-5.5 xhigh
2026-07-10 20:08:12 -04:00
..
analyze De-export test-only helpers via JET_EXTERN / #ifdef JEMALLOC_JET; declare in unit tests, not headers 2026-06-11 11:45:05 -04:00
include/test De-export test-only helpers via JET_EXTERN / #ifdef JEMALLOC_JET; declare in unit tests, not headers 2026-06-11 11:45:05 -04:00
integration test: handle profiled xallocx no-grow in extent test 2026-07-10 20:08:12 -04:00
src Remove safety check abort mallctl 2026-06-02 13:24:23 -04:00
stress Limit TSD bootstrap hook to tests 2026-07-06 18:26:40 -04:00
unit Handle jemalloc calls after TSD teardown 2026-07-09 11:30:15 -04:00
test.sh.in Speculative fix for Windows tasks that sometime fail on aligned_alloc 2026-06-02 13:24:23 -04:00