HomePhabricator

[lsan] Add interceptor for pthread_detach.

Authored by charco on Sep 25 2020, 2:17 PM.

Description

[lsan] Add interceptor for pthread_detach.

This commit adds an interceptor for the pthread_detach function,
calling into ThreadRegistry::DetachThread, allowing for thread contexts
to be reused.

Without this change, programs may fail when they create more than 8K
threads.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=47389

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D88184

Details

Committed
charcoSep 25 2020, 2:22 PM
Reviewer
vitalybuka
Differential Revision
D88184: [lsan] Add interceptor for pthread_detach.
Parents
rG69c6f6be07e4: Revert "[IRSim] Adding basic implementation of llvm-sim."
Branches
Unknown
Tags
Unknown