[all-commits] [llvm/llvm-project] f9b80e: [compiler-rt] Add opt-in -ftrivial-auto-var-init f...

PiJoules via All-commits all-commits at lists.llvm.org
Thu Dec 8 11:30:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9b80ed7fb83fa585065cccadc8f033a9d566e74
      https://github.com/llvm/llvm-project/commit/f9b80ed7fb83fa585065cccadc8f033a9d566e74
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M compiler-rt/CMakeLists.txt
    M compiler-rt/cmake/config-ix.cmake

  Log Message:
  -----------
  [compiler-rt] Add opt-in -ftrivial-auto-var-init flag for writing over uninitialized stack variiables

This might allow lsan to find more leaks that would have gone
undetected. When lsan searches for leaked pointers on the stack, if a
leaked pointer that was pushed to the stack in a prior function call
would not be scrubbed on a future function call, then the scan will see
the pointer on the stack and not mark it as leaked. Such holes can exist
in the lsan runtime where there may be uninitialized data. Adding
auto-var-init can scrub some of that data and might be able to catch
more leaks that would've gone undetected this way.

See https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=111351 for more
details.

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




More information about the All-commits mailing list