[all-commits] [llvm/llvm-project] 4d4a35: [TSan] Increase the number of simultaneously locke...

gbMattN via All-commits all-commits at lists.llvm.org
Sun Nov 24 00:59:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d4a353b8eddb0728d5b278befdccda4de484319
      https://github.com/llvm/llvm-project/commit/4d4a353b8eddb0728d5b278befdccda4de484319
  Author: gbMattN <146744444+gbMattN at users.noreply.github.com>
  Date:   2024-11-24 (Sun, 24 Nov 2024)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector.h
    A compiler-rt/test/tsan/many_held_mutex.cpp

  Log Message:
  -----------
  [TSan] Increase the number of simultaneously locked mutexes that a thread can hold (#116409)

I've run into an issue where TSan can't be used on some code without
turning off deadlock detection because a thread tries to hold too many
mutexes. It would be preferable to be able to use deadlock detection as
that is a major benefit of TSan.

Its mentioned in https://github.com/google/sanitizers/issues/950 that
the 64 mutex limit was an arbitrary number. I've increased it to 128 and
all the tests still pass. Considering the increasing number of cores on
CPUs and how programs can now use more threads to take advantage of it,
I think raising the limit to 128 would be some good future proofing

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list