[compiler-rt] r282860 - [compiler-rt][asan] Disable a broken test on windows 64-bits

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 07:31:39 PDT 2016


Author: etienneb
Date: Fri Sep 30 09:31:39 2016
New Revision: 282860

URL: http://llvm.org/viewvc/llvm-project?rev=282860&view=rev
Log:
[compiler-rt][asan] Disable a broken test on windows 64-bits

Summary:
This test is broken on wndows 64-bit.

The interception library is not able to hook on the memchr functions.

Snippet of the function that is not hookable:
```
--- No source file -------------------------------------------------------------
000007FEFA1A18CD CC                   int         3  
000007FEFA1A18CE CC                   int         3  
000007FEFA1A18CF CC                   int         3  
--- f:\dd\vctools\crt\vcruntime\src\string\amd64_arm_arm64\memchr.c ------------
        while ( cnt && (*(unsigned char *)buf != (unsigned char)chr) ) {
000007FEFA1A18D0 4D 85 C0             test        r8,r8  
000007FEFA1A18D3 74 0D                je          memchr+12h (07FEFA1A18E2h)  
000007FEFA1A18D5 38 11                cmp         byte ptr [rcx],dl  
000007FEFA1A18D7 74 09                je          memchr+12h (07FEFA1A18E2h)  
                buf = (unsigned char *)buf + 1;
000007FEFA1A18D9 48 FF C1             inc         rcx  
                cnt--;
000007FEFA1A18DC 49 83 E8 01          sub         r8,1  
000007FEFA1A18E0 75 F3                jne         memchr+5h (07FEFA1A18D5h)  
        }
```

Reviewers: rnk

Subscribers: kubabrecka, dberris, llvm-commits, chrisha

Differential Revision: https://reviews.llvm.org/D25037

Modified:
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc?rev=282860&r1=282859&r2=282860&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc Fri Sep 30 09:31:39 2016
@@ -2,6 +2,12 @@
 // RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
+// On windows 64-bit, the memchr function is written in assembly and is not
+// hookable with the interception library. There is not enough padding before
+// the function and there is a short jump on the second instruction which
+// doesn't not allow enough space to encode a 64-bit indirect jump.
+// UNSUPPORTED: x86_64-windows
+
 #include <string.h>
 
 extern "C" __declspec(dllexport)




More information about the llvm-commits mailing list