[all-commits] [llvm/llvm-project] b4c1e5: tsan: fix and test detection of TLS races

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Mon Sep 27 07:40:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4c1e5cb73bd26e5853af77c2a235ca9f35e2577
      https://github.com/llvm/llvm-project/commit/b4c1e5cb73bd26e5853af77c2a235ca9f35e2577
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
    A compiler-rt/test/tsan/tls_race3.cpp

  Log Message:
  -----------
  tsan: fix and test detection of TLS races

Currently detection of races with TLS/stack initialization
is broken because we imitate the write before thread initialization,
so it's modelled with a wrong thread/epoch.
Fix that and add a test.

Reviewed By: melver

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




More information about the All-commits mailing list