[PATCH] D22363: [compiler-rt] Add internal wcslen to avoid crashing on windows 64-bits

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 15:26:06 PDT 2016


etienneb added a comment.

In https://reviews.llvm.org/D22363#484241, @rnk wrote:

> lgtm





================
Comment at: lib/asan/asan_interceptors.cc:588
@@ -587,1 +587,3 @@
   ASAN_INTERCEPTOR_ENTER(ctx, wcslen);
+#if SANITIZER_WINDOWS64
+  // The function is incorrectly hooked on windows 64-bit.
----------------
rnk wrote:
> Eh, I don't think we need an ifdef, we can always use internal_wcslen. Better to be consistent. Nobody uses wcslen on Unix anyway. We added this interceptor for Windows.
landed here: Committed revision 275492.

================
Comment at: lib/asan/asan_win_dll_thunk.cc:384
@@ +383,3 @@
+#ifdef _WIN64
+INTERCEPT_LIBRARY_FUNCTION(__C_specific_handler);
+#else
----------------
rnk wrote:
> unrelated?
Bad patch editing.
This is the next patch.


https://reviews.llvm.org/D22363





More information about the llvm-commits mailing list