From f6d64f4d05f7c2b832b519adaf72b9dd061a0369 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 21 Mar 2016 18:23:07 +0000 Subject: [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 --- lib/interception/interception_win.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/interception') 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 -- cgit v1.2.3