[PATCH] D22111: [compiler-rt] Refactor the interception code on windows.

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 00:19:28 PDT 2016


etienneb added a comment.

added some 64-bits unittests.


================
Comment at: lib/interception/interception_win.cc:51
@@ +50,3 @@
+
+static bool FunctionHasPadding(uptr address, uptr size) {
+  u8* function = (u8*)address;
----------------
rnk wrote:
> Doesn't this scan forwards, and aren't we trying to scan backwards?
I'll rename the function.
It's scanning a memory region.
The computation for the nop is done at the call size.
This function will have other usage, so let rename it.

================
Comment at: lib/interception/interception_win.cc:355
@@ +354,3 @@
+  // Check if the targetd address can be encoded in the function padding.
+  uptr IndirectAddress = 0;
+#if SANITIZER_WINDOWS64
----------------
rnk wrote:
> These local variables should probably follow google naming conventions, which is the prevailing local style in the sanitizer libraries.
ok. I'm used to take the llvm coding style.


http://reviews.llvm.org/D22111





More information about the llvm-commits mailing list