[PATCH] D56157: [sanitizer_common] Implement popen, popenve, pclose interceptors

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 30 20:05:53 PST 2018


dvyukov added a comment.

This needs some tests, at least to exercise interceptors code once.



================
Comment at: lib/esan/esan_interceptors.cpp:90
   } while (false)
+#define COMMON_INTERCEPTOR_PIPE_OPEN(ctx, file)                                \
+  do {                                                                         \
----------------
The idea behind defining a no-op version in sanitizer_common_interceptors.inc was exactly that tools that are not interested in it does not need to be changed. So please remove this.


================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:2259
 
+#define COMMON_INTERCEPTOR_PIPE_OPEN(ctx, file) \
+  if (file) {                                   \
----------------
An alternative would be to pass NULL to COMMON_INTERCEPTOR_FILE_OPEN and then do:

  if (path)
    Acquire(thr, pc, File2addr(path))

Just to not multiply entities. But neither approach looks strictly better to me, so I am not too strong about it.


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D56157





More information about the llvm-commits mailing list