[PATCH] Add interceptor for 'textdomain' function

Evgeniy Stepanov eugenis at google.com
Mon Dec 2 04:27:15 PST 2013



================
Comment at: lib/sanitizer_common/sanitizer_platform_interceptors.h:51
@@ -50,2 +50,3 @@
 # define SANITIZER_INTERCEPT_STRCMP 1
+# define SANITIZER_INTERCEPT_TEXTDOMAIN 1
 # define SANITIZER_INTERCEPT_STRCASECMP SI_NOT_WINDOWS
----------------
did you check mac/android/win, etc?

================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:68
@@ +67,3 @@
+  char* domain = REAL(textdomain)(domainname);
+  COMMON_INTERCEPTOR_INITIALIZE_RANGE(ctx, domain,
+     REAL(strlen)(domain) + 1);
----------------
if (domain)


http://llvm-reviews.chandlerc.com/D2300



More information about the llvm-commits mailing list