[all-commits] [llvm/llvm-project] cddcf2: [DFSan] Avoid replacing uses of functions in compa...

Andrew Browne via All-commits all-commits at lists.llvm.org
Thu Apr 14 14:15:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cddcf2170ae8d5a199bb99aac2fd27f520696efe
      https://github.com/llvm/llvm-project/commit/cddcf2170ae8d5a199bb99aac2fd27f520696efe
  Author: Andrew Browne <browneee at google.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
    M llvm/test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt
    A llvm/test/Instrumentation/DataFlowSanitizer/extern_weak.ll

  Log Message:
  -----------
  [DFSan] Avoid replacing uses of functions in comparisions.

This can cause crashes by accidentally optimizing out checks for
extern_weak_func != nullptr, when replaced with a known-not-null wrapper.

This solution isn't perfect (only avoids replacement on specific patterns)
but should address common cases.

Internal reference: b/185245029

Reviewed By: vitalybuka

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




More information about the All-commits mailing list