[PATCH] D20884: This patch attempts to primitive support for Win64 asan
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 12:32:40 PDT 2016
pcc added inline comments.
================
Comment at: compiler-rt/trunk/lib/interception/interception_win.cc:267
@@ -162,1 +266,3 @@
+ // the full 64-bit address for new_func.
// We might want to be able to execute the original 'old_func' from the
+ // wrapper, in this case we need to keep the leading 5+ (6+ on Win64)
----------------
rnk wrote:
> pcc wrote:
> > Do we ever actually need to do this on Windows? It looks like most of the functions we are intercepting are C standard library functions which we could easily implement ourselves.
> Sure, but we'd have to remove all uses of REAL in asan_interceptors.cc and sanitizer_common_interceptors.inc, which would be a lot of work and would mean Windows has special rules for writing interceptors.
> Sure, but we'd have to remove all uses of REAL in asan_interceptors.cc and sanitizer_common_interceptors.inc
Not necessarily, we could define REAL as something like `#define REAL(x) real_##x` on Windows, and provide sanitizer_common implementations of whichever `real_foo` functions are needed on Windows.
> would mean Windows has special rules for writing interceptors.
That's unfortunate, but it seems less fragile than trying to pattern match every possible instruction sequence here.
Repository:
rL LLVM
http://reviews.llvm.org/D20884
More information about the llvm-commits
mailing list