[PATCH] D19875: [sanitizer] Move stat/__xstat to the common interceptors

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 11:15:12 PDT 2016


aizatsky added inline comments.

================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:5520
@@ -5519,1 +5519,3 @@
 
+#if SANITIZER_INTERCEPT_STAT
+INTERCEPTOR(int, stat, const char *path, void *buf) {
----------------
The direction of this CL is good. I worry that stat/xstat behavior is not really clear.

Other interceptors (e.g. SANITIZER_INTERCEPT_STRCHR) are completely enabled/disabled by a guard. In this case it is not fully enabled/disabled, but an implementation is switched.

I suggest having two guards: one that turns it on/off, the other one chooses the implementation. WDYT?


Repository:
  rL LLVM

http://reviews.llvm.org/D19875





More information about the llvm-commits mailing list