[all-commits] [llvm/llvm-project] a83eb0: [lsan] Add interceptor for pthread_detach.

Marco Vanotti via All-commits all-commits at lists.llvm.org
Fri Sep 25 14:23:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a83eb048cb9a75da7a07a9d5318bbdbf54885c87
      https://github.com/llvm/llvm-project/commit/a83eb048cb9a75da7a07a9d5318bbdbf54885c87
  Author: Marco Vanotti <mvanotti at google.com>
  Date:   2020-09-25 (Fri, 25 Sep 2020)

  Changed paths:
    M compiler-rt/lib/lsan/lsan_interceptors.cpp
    M compiler-rt/lib/lsan/lsan_thread.cpp
    M compiler-rt/lib/lsan/lsan_thread.h
    A compiler-rt/test/lsan/TestCases/many_threads_detach.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list