summaryrefslogtreecommitdiff
path: root/lib/interception
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-03-21 18:23:07 +0000
committerReid Kleckner <rnk@google.com>2016-03-21 18:23:07 +0000
commitf6d64f4d05f7c2b832b519adaf72b9dd061a0369 (patch)
tree162a86a8bae48fc3b83116397351b5e705b1d3aa /lib/interception
parent1c60e625922d86d922826a9a7d3600ea76143ac7 (diff)
[asan] Update hotpatch code for VS 2015 memset implementation
In VS 2015, the memset fill parameter is zero extended from one byte instead of being copied wholesale. The issue reproduces with existing tests if you use VS2015. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception')
-rw-r--r--lib/interception/interception_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/interception/interception_win.cc b/lib/interception/interception_win.cc
index 4c04c83b9..fdecff26a 100644
--- a/lib/interception/interception_win.cc
+++ b/lib/interception/interception_win.cc
@@ -119,6 +119,11 @@ static size_t RoundUpToInstrBoundary(size_t size, char *code) {
cursor += 4;
continue;
}
+ switch (*(unsigned int *)(code + cursor)) {
+ case 0X2444B60F: // 0F B6 44 24 XX = movzx eax, byte ptr [esp+XXh]
+ cursor += 5;
+ continue;
+ }
// Unknown instruction!
// FIXME: Unknown instruction failures might happen when we add a new