[PATCH] D20884: This patch attempts to primitive support for Win64 asan

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 15:55:59 PDT 2016


kcc added a subscriber: kcc.

================
Comment at: lib/asan/asan_interceptors.cc:733
@@ -731,1 +732,3 @@
+    // On Win64, this code causes interception on an intercepted function.
+#ifndef _WIN64
     ASAN_INTERCEPT_FUNC(memcpy);
----------------
define SANITIZER_WIN64 similar to SANITIZER_LINUX and use it instead of _WIN64

================
Comment at: lib/asan/asan_interceptors.cc:734
@@ -731,1 +733,3 @@
+#ifndef _WIN64
     ASAN_INTERCEPT_FUNC(memcpy);
+#endif
----------------
Then define SANITIZER_INTERCEPT_MEMCPY similar to SANITIZER_INTERCEPT_MEMCHR
Make it 0 under SANITIZER_WIN64, and there explain why. 

================
Comment at: lib/interception/interception_win.cc:46
@@ -45,1 +45,3 @@
 
+static void WriteJumpInstruction_14I(char *jmp_from, char *to) {
+  // Jump to any address with 14 instruction bytes on x64.
----------------
I hope someone else can review this code :) 


http://reviews.llvm.org/D20884





More information about the llvm-commits mailing list