[all-commits] [llvm/llvm-project] 2d9c6e: [dfsan] Add origin chain utils

Z via All-commits all-commits at lists.llvm.org
Thu Feb 11 11:10:57 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d9c6e10e92e983fb3ad497f29bea697a94c935a
      https://github.com/llvm/llvm-project/commit/2d9c6e10e92e983fb3ad497f29bea697a94c935a
  Author: Jianzhou Zhao <jianzhouzh at google.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M compiler-rt/lib/dfsan/CMakeLists.txt
    M compiler-rt/lib/dfsan/dfsan.cpp
    M compiler-rt/lib/dfsan/dfsan.h
    A compiler-rt/lib/dfsan/dfsan_chained_origin_depot.cpp
    A compiler-rt/lib/dfsan/dfsan_chained_origin_depot.h
    A compiler-rt/lib/dfsan/dfsan_flags.h
    M compiler-rt/lib/dfsan/dfsan_flags.inc
    A compiler-rt/lib/dfsan/dfsan_origin.h

  Log Message:
  -----------
  [dfsan] Add origin chain utils

This is a part of https://reviews.llvm.org/D95835.

The design is based on MSan origin chains.

An 4-byte origin is a hash of an origin chain. An origin chain is a
pair of a stack hash id and a hash to its previous origin chain. 0 means
no previous origin chains exist. We limit the length of a chain to be
16. With origin_history_size = 0, the limit is removed.

The change does not have any test cases yet. The following change
will be adding test cases when the APIs are used.

Reviewed-by: morehouse

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




More information about the All-commits mailing list