[PATCH] [Sanitizer][MIPS] internal_stat for mips64
Alexey Samsonov
vonosmas at gmail.com
Tue Nov 25 16:20:47 PST 2014
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:181
@@ -180,1 +180,3 @@
+#ifdef __mips64
+void kernel_stat_to_stat(struct kernel_stat *in, struct stat *out) {
----------------
Use
#if defined(__mips64)
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:208
@@ -187,1 +207,3 @@
#elif SANITIZER_LINUX_USES_64BIT_SYSCALLS
+ #ifdef __mips64
+ // For MIPS, syscall stat fills buffer in structure kerenl_stat form
----------------
Nest compiler directives like this:
#if FOO
# if BAR
// code
# endif
#endif
================
Comment at: lib/sanitizer_common/sanitizer_platform.h:121
@@ +120,3 @@
+#ifdef __mips64
+ struct kernel_stat {
+ unsigned int st_dev;
----------------
Is there no header you can #include in sanitizer_linux.cc on MIPS to get the definition of this structure?
In any case, this is the wrong place for the declaration. If you absolutely must provide the declaration, move it to sanitizer_platform_limits_posix.h
http://reviews.llvm.org/D6385
More information about the llvm-commits
mailing list