[PATCH] D88559: [Sanitizer] Add interceptor for ptsname

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 05:23:39 PDT 2020


labath added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:4904
+  if (res != nullptr)
+    COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, REAL(strlen)(res) + 1);
+  return res;
----------------
I'm not sure I understand the difference between COMMON_INTERCEPTOR_INITIALIZE_RANGE and COMMON_INTERCEPTOR_WRITE_RANGE. For example, I would have expected tsan to warn about concurrent usages of ptsname from different threads (and changing this to WRITE_RANGE does achieve that), but maybe there is a reason why these functions use the INITIALIZE macro (?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88559



More information about the llvm-commits mailing list