summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_platform.h
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-06-06 18:09:54 +0000
committerEtienne Bergeron <etienneb@google.com>2016-06-06 18:09:54 +0000
commite2e2f47b377ba5c5151bddc528f12fc9c2812bdf (patch)
tree5f2795cd15900b639358cbb2d42a4a624c623476 /lib/sanitizer_common/sanitizer_platform.h
parent377ec60591cbfcef6ecf022b76b06e8a8ab67990 (diff)
downloadcompiler-rt-e2e2f47b377ba5c5151bddc528f12fc9c2812bdf.tar.gz
This patch attempts to primitive support for Win64 asan
Some known issues are: When "head" include instructions that involve branching, the "cut and paste" approach may break down in a way that function interception still work but calling back the original function does not work. The jmp [rip -8] saves some bytes in the "head" but finding the safe zone of 0xCC is not implemented yet. So it may stomp on preceding codes. The shadow offset is not working yet on Win64. More complexity maybe involved since there are some differences regarding virtual address space between Window 8 and Windows 8.1/10. Patch by: Wang Wei Differential Revision: http://reviews.llvm.org/D20884 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_platform.h')
-rw-r--r--lib/sanitizer_common/sanitizer_platform.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
index 2affbf23c..8824912b1 100644
--- a/lib/sanitizer_common/sanitizer_platform.h
+++ b/lib/sanitizer_common/sanitizer_platform.h
@@ -67,6 +67,12 @@
# define SANITIZER_WINDOWS 0
#endif
+#if defined(_WIN64)
+# define SANITIZER_WINDOWS64 1
+#else
+# define SANITIZER_WINDOWS64 0
+#endif
+
#if defined(__ANDROID__)
# define SANITIZER_ANDROID 1
#else