-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Labels
A-concurrencyArea: affects our concurrency (multi-thread) supportArea: affects our concurrency (multi-thread) supportC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement
Description
With #1284 we can run multi-threaded programs in Miri. However, right now we error if, when the main thread exits, there are any other threads still left. We should properly support that case.
For that, we need to:
- not complain about memory reachable from those threads as leaking.
- figure out what the semantics are wrt. TLS dtors. I assume those do not run for threads that are still around (after all the thread might be working on that piece of TLS right now, so a dtor would find it in an inconsistent state), but we should confirm that and leave appropriate comments.
- decide what to do about non-detached threads still running when the main thread exits. I am inclined to call those threads a leak, but maybe if they were spawned by a detached thread it's okay? IMO we should report a leak when e.g. the main thread spawns a thread and then neither detaches nor joins it.
Cc @vakaras
chuigda
Metadata
Metadata
Assignees
Labels
A-concurrencyArea: affects our concurrency (multi-thread) supportArea: affects our concurrency (multi-thread) supportC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement