[all-commits] [llvm/llvm-project] b12e14: [memprof] Switch allocator to dynamic base address...

Thurston Dang via All-commits all-commits at lists.llvm.org
Thu Jul 11 19:24:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b12e141fb14a8b603984e1d29339e344e0db36ce
      https://github.com/llvm/llvm-project/commit/b12e141fb14a8b603984e1d29339e344e0db36ce
  Author: Thurston Dang <thurston at google.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M compiler-rt/lib/memprof/memprof_allocator.h

  Log Message:
  -----------
  [memprof] Switch allocator to dynamic base address (#98510)

memprof_rtl.cpp calls InitializeShadowMemory() - which
dynamically/"randomly" chooses a base address for the shadow mapping -
prior to InitializeAllocator(). If we are unlucky, the shadow memory may
be mapped in the same region where the allocator wants to be.

This patch fixes the issue by changing the allocator to dynamically
choosing a base address, as suggested by Vitaly. For comparison, HWASan
already dynamically chooses the base addresses for the shadow mapping
and allocator.

The "unlucky" failure was observed on a new buildbot:
https://lab.llvm.org/buildbot/#/builders/66/builds/1361/steps/17/logs/stdio

---------

Co-authored-by: Vitaly Buka <vitalybuka at gmail.com>



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