[all-commits] [llvm/llvm-project] 7ede1c: [asan] Switch allocator to dynamic base address (#...

Thurston Dang via All-commits all-commits at lists.llvm.org
Fri Aug 9 10:37:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ede1c4973029f611ad0890ed5fe61f530774da3
      https://github.com/llvm/llvm-project/commit/7ede1c4973029f611ad0890ed5fe61f530774da3
  Author: Thurston Dang <thurston at google.com>
  Date:   2024-08-09 (Fri, 09 Aug 2024)

  Changed paths:
    M compiler-rt/lib/asan/asan_allocator.h

  Log Message:
  -----------
  [asan] Switch allocator to dynamic base address (#98511)

This ports a fix from memprof (https://github.com/llvm/llvm-project/pull/98510), which has a shadow mapping that is similar to ASan (8 bytes of shadow memory per 64 bytes of app memory). This patch changes the allocator to dynamically choose a base address, as suggested by Vitaly for memprof. This simplifies ASan's #ifdef's and avoids potential conflict in the event that ASan were to switch to a dynamic shadow offset in the future [1].

[1] Since shadow memory is mapped before the allocator is mapped:
- dynamic shadow and fixed allocator (old memprof): could fail if
"unlucky" (e.g., https://lab.llvm.org/buildbot/#/builders/66/builds/1361/steps/17/logs/stdio)
- dynamic shadow and dynamic allocator (HWASan; current memprof): always works
- fixed shadow and fixed allocator (current ASan): always works, if
constants are carefully chosen
- fixed shadow and dynamic allocator (ASan with this patch): always works



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list