jemalloc/test/integration
Azat Khuzhin c68b7b1cac test: add tcache_fiber_migration standalone LTO reproducer
Exercises the tsd thread-pointer hoisting bug: ucontext fibers do
free/swapcontext/malloc in one frame on a worker pool, so a fiber routinely
resumes on a different OS thread; under whole-program LTO the inlined fastpath
then frees/allocs against the previous thread's tcache and crashes.

It is a standalone program (no test harness, so it can be static-linked without
symbol clashes), calling jemalloc via JEMALLOC_MANGLE and linked statically with
--whole-archive so the allocator inlines next to the swapcontext.  Built only
when -flto is in the build flags -- without LTO the allocator is not inlined and
the bug cannot reproduce, so the test would be a meaningless always-pass -- and
gated on ELF + static + have_ucontext (a configure link test, since musl
declares but does not implement getcontext/makecontext/swapcontext).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 12:54:12 +02:00
..
cpp Replace experimental_infallible_new with compile-time flag 2026-06-06 09:50:37 -04:00
aligned_alloc.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
allocated.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
extent.c Consolidate arena_* header split into arena.h 2026-06-04 11:32:53 -04:00
extent.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
malloc.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
mallocx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
mallocx.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00
MALLOCX_ARENA.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
overflow.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
posix_memalign.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
rallocx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
sdallocx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
slab_sizes.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
slab_sizes.sh Add MALLOC_CONF parsing for dynamic slab sizes. 2018-07-12 20:53:06 -07:00
smallocx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
smallocx.sh Adapts mallocx integration tests for smallocx 2018-10-17 07:12:28 -07:00
tcache_fiber_migration.c test: add tcache_fiber_migration standalone LTO reproducer 2026-06-22 12:54:12 +02:00
thread_arena.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
thread_tcache_enabled.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
xallocx.c Reformat the codebase with the clang-format 18. 2026-03-10 18:14:33 -07:00
xallocx.sh Use MALLOC_CONF rather than malloc_conf for tests. 2017-02-23 08:57:02 -08:00