[PATCH] [sanitizer] Add interceptors for localtime and friends
Alexey Samsonov
samsonov at google.com
Fri Feb 15 03:28:37 PST 2013
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.cc:1
@@ -1,2 +1,2 @@
//===-- msan_platform_limits.cc -------------------------------------------===//
//
----------------
please fix headers
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.cc:10
@@ -9,3 +9,3 @@
//
// This file is a part of MemorySanitizer.
//
----------------
And comments
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.cc:29
@@ -27,3 +28,3 @@
#include <sys/socket.h>
-#include <dirent.h>
+#include <time.h>
----------------
Hope all of these headers are there on Mac
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:35
@@ -33,3 +34,3 @@
uptr __msan_get_socklen_t(void* socklen_ptr);
} // namespace __msan
----------------
namespace __sanitizer
================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:31
@@ -29,3 +30,3 @@
void* __msan_get_msghdr_iov_iov_base(void* msg, int idx);
uptr __msan_get_msghdr_iov_iov_len(void* msg, int idx);
----------------
Can you rename the functions to __sanitizer_get_msghdr ... etc?
================
Comment at: lib/sanitizer_common/sanitizer_platform_interceptors.h:19
@@ -18,2 +18,3 @@
# define SI_NOT_WINDOWS 1
+#include "sanitizer_platform_limits_posix.h"
#else
----------------
# include
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:149
@@ -148,1 +148,3 @@
+#if SANITIZER_INTERCEPT_LOCALTIME_AND_FRIENDS
+INTERCEPTOR(void *, localtime, unsigned long *timep) {
----------------
I think you will need to add function declarations to asan_intercepted_functions.h :-[
http://llvm-reviews.chandlerc.com/D412
More information about the llvm-commits
mailing list