[all-commits] [llvm/llvm-project] 9a0237: [lsan] Ignore inderect leaks referenced by suppres...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Wed Dec 30 19:16:46 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a0237011b7e9e8111757365d1cb322fbbb086ae
      https://github.com/llvm/llvm-project/commit/9a0237011b7e9e8111757365d1cb322fbbb086ae
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2020-12-30 (Wed, 30 Dec 2020)

  Changed paths:
    M compiler-rt/lib/lsan/lsan_common.cpp
    M compiler-rt/lib/lsan/lsan_common.h
    M compiler-rt/test/lsan/TestCases/suppressions_file.cpp

  Log Message:
  -----------
  [lsan] Ignore inderect leaks referenced by suppressed blocks

This makes suppression list to work similar to __lsan_ignore_object.

Existing behavior was inconsistent and very inconvenient for complex
data structures.

Example:

struct B;
struct A { B* ptr; };
A* t = makeA();
t->ptr = makeB();

Before the patch: if makeA suppressed by suppression file, lsan will
still report the makeB() leak, so we need two suppressions.

After the patch: a single makeA suppression is enough (the same as a
single __lsan_ignore_object(t)).

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




More information about the All-commits mailing list