llvm-project/compiler-rt
Andrew Browne 45f6d5522f [DFSan] Change shadow and origin memory layouts to match MSan.
Previously on x86_64:

  +--------------------+ 0x800000000000 (top of memory)
  | application memory |
  +--------------------+ 0x700000008000 (kAppAddr)
  |                    |
  |       unused       |
  |                    |
  +--------------------+ 0x300000000000 (kUnusedAddr)
  |       origin       |
  +--------------------+ 0x200000008000 (kOriginAddr)
  |       unused       |
  +--------------------+ 0x200000000000
  |   shadow memory    |
  +--------------------+ 0x100000008000 (kShadowAddr)
  |       unused       |
  +--------------------+ 0x000000010000
  | reserved by kernel |
  +--------------------+ 0x000000000000

  MEM_TO_SHADOW(mem) = mem & ~0x600000000000
  SHADOW_TO_ORIGIN(shadow) = kOriginAddr - kShadowAddr + shadow

Now for x86_64:

  +--------------------+ 0x800000000000 (top of memory)
  |    application 3   |
  +--------------------+ 0x700000000000
  |      invalid       |
  +--------------------+ 0x610000000000
  |      origin 1      |
  +--------------------+ 0x600000000000
  |    application 2   |
  +--------------------+ 0x510000000000
  |      shadow 1      |
  +--------------------+ 0x500000000000
  |      invalid       |
  +--------------------+ 0x400000000000
  |      origin 3      |
  +--------------------+ 0x300000000000
  |      shadow 3      |
  +--------------------+ 0x200000000000
  |      origin 2      |
  +--------------------+ 0x110000000000
  |      invalid       |
  +--------------------+ 0x100000000000
  |      shadow 2      |
  +--------------------+ 0x010000000000
  |    application 1   |
  +--------------------+ 0x000000000000

  MEM_TO_SHADOW(mem) = mem ^ 0x500000000000
  SHADOW_TO_ORIGIN(shadow) = shadow + 0x100000000000

Reviewed By: stephan.yichao.zhao, gbalats

Differential Revision: https://reviews.llvm.org/D104896
2021-06-25 17:00:38 -07:00
..
cmake Revert "Revert "[cmake] [compiler-rt] Call llvm_setup_rpath() when adding shared libraries."" 2021-06-22 16:11:29 -07:00
docs
include [dfsan] Add stack-trace printing functions to dfsan interface 2021-06-14 14:09:00 -07:00
lib [DFSan] Change shadow and origin memory layouts to match MSan. 2021-06-25 17:00:38 -07:00
test [DFSan] Change shadow and origin memory layouts to match MSan. 2021-06-25 17:00:38 -07:00
tools [GWP-ASan] Add inbuilt options parser. 2021-01-15 12:57:05 -08:00
unittests [sanitizer] Use COMPILER_RT_EMULATOR with gtests 2021-04-25 15:41:13 -07:00
utils [compiler-rt] [netbsd] Update generate_netbsd_syscalls.awk 2020-09-10 20:16:17 +02:00
www [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt [compiler-rt] Make use of undefined symbols configurable 2021-06-22 14:25:36 -07:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================