[all-commits] [llvm/llvm-project] ef2ff5: tsan: fix latent bug in shadow computation

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Fri Aug 13 07:39:08 PDT 2021


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

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_platform.h

  Log Message:
  -----------
  tsan: fix latent bug in shadow computation

We use kShadowCnt (number of shadow cells per application granule)
when computing shadow, but it's wrong. We need the ratio
between shadow and app memory (how much shadow is larger than app memory),
which is kShadowMultiplier.
Currently both are equal to 4, so it works fine.
Use the correct constant.

Reviewed By: melver

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




More information about the All-commits mailing list