[PATCH] D35554: Add NetBSD support in sanitizer_platform_limits_posix.*
Alexander Potapenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 05:45:31 PDT 2017
glider added a comment.
A couple of drive-by comments.
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:29
+#define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
+ ((link_map *)((handle) == nullptr ? nullptr : ((char *)(handle) + 608)))
+#elif defined(__i386__)
----------------
Can you please wrap this line into a macro that takes handle and offset and returns the link_map* ?
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:53
extern unsigned struct_stat_sz;
-#if !SANITIZER_FREEBSD && !SANITIZER_IOS
+#if !SANITIZER_FREEBSD && !SANITIZER_IOS && !SANITIZER_NETBSD
extern unsigned struct_stat64_sz;
----------------
I suggest we always keep SANITIZER_FREEBSD and SANITIZER_NETBSD together in the ifdefs:
` !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_IOS`
By the way, do we need a special `SANITIZER_BSD` for the common BSD-specific cases?
I guess in many cases `SANITIZER_FREEBSD || SANITIZER_NETBSD` also means "or other BSD system"
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:75
#if !SANITIZER_ANDROID
+#if !SANITIZER_NETBSD
----------------
Please change this to "#if !SANITIZER_ANDROID && !SANITIZER_NETBSD"
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:608
// 'clock_t' is 32 bits wide on x64 FreeBSD
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
----------------
Please fix the comment.
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:732
+ };
#else // !SANITIZER_ANDROID
struct __sanitizer_sigaction {
----------------
Please fix the comment.
Repository:
rL LLVM
https://reviews.llvm.org/D35554
More information about the llvm-commits
mailing list