[PATCH] D96977: [dfsan] Instrument origin variable and function definitions

stephan.yichao.zhao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 14:54:02 PST 2021


stephan.yichao.zhao added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:482
 
+  uint64_t numOfElementsInArgOrgTLS();
+
----------------
morehouse wrote:
> Can this be constant instead of a function?
Thank you. Replaced by kNumOfElementsInArgOrgTLS;


================
Comment at: llvm/test/Instrumentation/DataFlowSanitizer/basic.ll:11
+; CHECK: @__dfsan_track_origins = weak_odr constant i32 0
+; CHECK_ORIGIN: @__dfsan_track_origins = weak_odr constant i32 1
+; CHECK: @__dfsan_shadow_ptr_mask = external global i64
----------------
morehouse wrote:
> IIRC, even with `--check-prefix`, the `CHECK` lines are still verified.  So don't we get a failure for the line above this one (track_origins = 0)?
Hm, I found FileCheck ignores CHECK if [[ https://llvm.org/docs/CommandGuide/FileCheck.html#cmdoption-filecheck-check-prefix | --check-prefix ]] is used.
But the problem is that we may want to rename the last one with prefix CHECK_NO_ORIGIN.

Updated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96977/new/

https://reviews.llvm.org/D96977



More information about the llvm-commits mailing list