[all-commits] [llvm/llvm-project] 415b1c: Add __sanitizer_get_allocated_begin API and implem...

thurstond via All-commits all-commits at lists.llvm.org
Mon Apr 3 14:45:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 415b1cfd57de62da8af9ad8dc567fc9d918dbaa5
      https://github.com/llvm/llvm-project/commit/415b1cfd57de62da8af9ad8dc567fc9d918dbaa5
  Author: Thurston Dang <thurston at google.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    M compiler-rt/include/sanitizer/allocator_interface.h
    M compiler-rt/lib/asan/asan_allocator.cpp
    M compiler-rt/lib/dfsan/dfsan_allocator.cpp
    M compiler-rt/lib/hwasan/hwasan_allocator.cpp
    M compiler-rt/lib/lsan/lsan_allocator.cpp
    M compiler-rt/lib/memprof/memprof_allocator.cpp
    M compiler-rt/lib/msan/msan_allocator.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h
    M compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc
    M compiler-rt/lib/tsan/rtl/tsan_mman.cpp
    A compiler-rt/test/sanitizer_common/TestCases/get_allocated_begin.cpp

  Log Message:
  -----------
  Add __sanitizer_get_allocated_begin API and implementations

This function will return the start of the allocation, if given a pointer that lies within an allocation. Otherwise, it returns NULL.

It will be useful for detecting dynamic TLS allocations in glibc >=2.25, which
uses malloc (see https://github.com/google/sanitizers/issues/1409#issuecomment-1214244142).

Reviewed By: vitalybuka

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




More information about the All-commits mailing list