[PATCH] D40898: [Sanitizers] Basic sanitizer Solaris support (PR 33274)
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 18:11:57 PST 2017
alekseyshl added a comment.
Mostly looks good, just a few minor changes.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:2179
return res;
}
+#define INIT_GLOB \
----------------
Can you rearrange the code this way:
#if SANITIZER_SOLARIS
Stripped down interceptor definition
#else // SANITIZER_SOLARIS
Current glob definitions and interceptor code here, unchanged
#endif // SANITIZER_SOLARIS
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:2530
+#define INIT_GETHOSTBYNAME
+#endif
+
----------------
#endif // SANITIZER_INTERCEPT_GETHOSTBYNAME
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:2543
+#define INIT_GETHOSTBYNAME2
#endif
----------------
#endif // SANITIZER_INTERCEPT_GETHOSTBYNAME2
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1068
return module_name_len;
+#endif
}
----------------
#endif // SANITIZER_SOLARIS
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1808
+# define mc_gregs gregs
+#endif
*pc = ucontext->uc_mcontext.mc_gregs[MC_PC];
----------------
Please indent this block of defines by one more space
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:135
pthread_attr_destroy(&attr);
+#endif
----------------
#endif // SANITIZER_SOLARIS
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:615
+#elif SANITIZER_SOLARIS
+ return sysconf(_SC_NPROCESSORS_ONLN);
#else
----------------
So, it does not allocate memory on Solaris?
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D40898
More information about the llvm-commits
mailing list