[PATCH] [msan] Intercept *getxattr and *listxattr.

Evgeniy Stepanov eugenis at google.com
Thu Jan 30 02:48:12 PST 2014


  LGTM


================
Comment at: lib/msan/lit_tests/Linux/xattr.cc:8
@@ +7,3 @@
+#include <sys/types.h>
+#include <attr/xattr.h>
+#include <errno.h>
----------------
This will fail if libattr is not installed. I think we need to check it either in configure/cmake or in this test, and pass if not found.

================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:3076
@@ +3075,3 @@
+  SSIZE_T res = REAL(listxattr)(path, list, size);
+  if (size && res > 0 && list) COMMON_INTERCEPTOR_WRITE_RANGE(ctx, list, res);
+  return res;
----------------
Please add a comment here about size==0 being a special case.


http://llvm-reviews.chandlerc.com/D2642

BRANCH
  msan/listxattr

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list