[PATCH] [compiler-rt] Fix the prototype of ioctl interceptor

Evgeniy Stepanov eugenis at google.com
Tue Jan 20 03:20:06 PST 2015


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:1028
@@ -1027,3 +1027,3 @@
 #include "sanitizer_common_interceptors_ioctl.inc"
-INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg) {
+INTERCEPTOR(int, ioctl, int d, unsigned long request, ...) {
   void *ctx;
----------------
I agree with "unsigned long request", but is there any benefit in the _unconditional_ va_arg stuff? We don't reliably know if there is an argument to a given ioctl or not, and then we pass this (possible garbage) value to REAL(ioctl) in any case.

http://reviews.llvm.org/D7038

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list