[PATCH] [compiler-rt] Fix the prototype of ioctl interceptor
Evgeniy Stepanov
eugenis at google.com
Fri Jan 23 00:57:03 PST 2015
In http://reviews.llvm.org/D7038#112364, @kubabrecka wrote:
> Are you suggesting not to use the variadic prototype of the function, i.e.
>
> int ioctl(int fildes, unsigned long request, void *arg);
>
>
> ? Because that's exactly what I think is the cause of the memory corruptions that I saw. Even when we *know* there's exactly one var-argument every time, the following function headers are not equal on all platforms:
>
> int ioctl(int fildes, unsigned long request, void *arg);
> int ioctl(int fildes, unsigned long request, ...);
Ok, I guess.
Btw, what platforms do you have in mind where the old code (w/o va_arg, but with "unsigned long request") would not work correctly?
http://reviews.llvm.org/D7038
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list