[all-commits] [llvm/llvm-project] 721af7: [asan] Add experimental 'poison_history_size' flag...

Thurston Dang via All-commits all-commits at lists.llvm.org
Thu Apr 10 13:54:16 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 721af7e636c3dc9bbc5b13ef52331addc8242b50
      https://github.com/llvm/llvm-project/commit/721af7e636c3dc9bbc5b13ef52331addc8242b50
  Author: Thurston Dang <thurston at google.com>
  Date:   2025-04-10 (Thu, 10 Apr 2025)

  Changed paths:
    M compiler-rt/lib/asan/asan_errors.cpp
    M compiler-rt/lib/asan/asan_flags.inc
    M compiler-rt/lib/asan/asan_poisoning.cpp
    M compiler-rt/lib/asan/asan_poisoning.h
    M compiler-rt/lib/asan/asan_posix.cpp
    A compiler-rt/test/asan/TestCases/use-after-poison-history-size-partial-granule.cpp
    A compiler-rt/test/asan/TestCases/use-after-poison-history-size.cpp

  Log Message:
  -----------
  [asan] Add experimental 'poison_history_size' flag (#133175)

This adds an experimental flag that will keep track of where the manual memory poisoning (`__asan_poison_memory_region`) is called from, and print the stack trace if the poisoned region is accessed. (Absent this flag, ASan will tell you what code accessed a poisoned region, but not which code set the poison.)

This implementation performs best-effort record keeping using ring buffers, as suggested by Vitaly. The size of each ring buffer is set by the `poison_history_size` flag.



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