Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/core/pthread/test_pthread_dylink_tls_free.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ int main() {

// Each thread allocates the side module's 4 KiB TLS block on first access and
// must free it when it exits. Without the fix the heap grows by one block
// per thread; with it, growth is bounded by the last thread's not-yet-
// reclaimed stack, far below NUM_THREADS blocks. NUM_THREADS is large so a
// real leak clearly exceeds that fixed slack.
// per thread. This runs on the main runtime thread (no PROXY_TO_PTHREAD) so
// that pthread_join() frees the joined thread's own block (stack, TLS,
// pthread struct) synchronously. From a pthread that free happens later on
// the main thread, which can fall several joins behind and make the
// measurement depend on timing.
run_threads(10);
size_t before = mallinfo().uordblks;
run_threads(NUM_THREADS);
Expand Down
1 change: 0 additions & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9449,7 +9449,6 @@ def test_pthread_dylink_tls_free(self):

self.prep_dlfcn_main()
self.set_setting('EXIT_RUNTIME')
self.set_setting('PROXY_TO_PTHREAD')
self.do_runf('core/pthread/test_pthread_dylink_tls_free.c', 'done\n')

@needs_dylink
Expand Down
Loading