[all-commits] [llvm/llvm-project] 7d039e: [tsan] Increase size of shadow mappings for C/C++ ...

Thurston Dang via All-commits all-commits at lists.llvm.org
Thu Nov 2 09:49:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d039effc4930be9240446a4241d268a39960e0b
      https://github.com/llvm/llvm-project/commit/7d039effc4930be9240446a4241d268a39960e0b
  Author: Thurston Dang <thurston.dang at gmail.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

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

  Log Message:
  -----------
  [tsan] Increase size of shadow mappings for C/C++ on linux/x86_64 (#70517)

The current TSan mappings for C/C++ on linux/x86_64 have 0.5TB
for low app mem, 1.5TB (1.17TB usable) for mid app mem and
1.5TB for high app mem.
This can get a bit cramped if the apps are huge, and/or (in the
case of mid/high app mem) with significant ASLR entropy
(default ASLR setting of 28-bits = 1TB).

This patch increases the mapping sizes to 2TB, 5TB, and 6TB for
the low, mid and high app regions respectively. This is compatible
with up to 30-bits of ASLR entropy. It is difficult to make the
mappings any larger, given the 44-bit pointer compression.

It also moves the heap region to avoid HeapEnd() overlapping with
the newly enlarged high app region.

For convenience, we now use kShadowAdd instead of kShadowXor for
this set of mappings. This should be roughly equivalent in
runtime performance.




More information about the All-commits mailing list