[all-commits] [llvm/llvm-project] a82c74: tsan: introduce RawShadow type

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Thu Aug 5 04:37:22 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a82c7476a76a8305905a6423d337ea5bbd66c837
      https://github.com/llvm/llvm-project/commit/a82c7476a76a8305905a6423d337ea5bbd66c837
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-08-05 (Thu, 05 Aug 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_debugging.cpp
    M compiler-rt/lib/tsan/rtl/tsan_defs.h
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
    M compiler-rt/lib/tsan/rtl/tsan_interface_java.cpp
    M compiler-rt/lib/tsan/rtl/tsan_platform.h
    M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl.h
    M compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
    M compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
    M compiler-rt/lib/tsan/tests/unit/tsan_shadow_test.cpp

  Log Message:
  -----------
  tsan: introduce RawShadow type

Currently we hardcode u64 type for shadow everywhere
and do lots of uptr<->u64* casts. It makes it hard to
change u64 to another type (e.g. u32) and makes it easy
to introduce bugs.
Introduce RawShadow type and use it in MemToShadow, ShadowToMem,
IsShadowMem and throughout the code base as u64 replacement.
This makes it possible to change u64 to something else in future
and generally improves static typing.

Depends on D107481.

Reviewed By: vitalybuka

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




More information about the All-commits mailing list