[PATCH] D22484: [compiler-rt] Fix Asan imports/exports unittest

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 15:23:11 PDT 2016


etienneb created this revision.
etienneb added a reviewer: rnk.
etienneb added subscribers: chrisha, wang0109, llvm-commits.
Herald added a subscriber: kubabrecka.

Avoid mismatch between imports/exports for 32-bit and 64-bits version.

The test is running grep over macros to detect which functions are
intercepted. Unfortunately, exception handlers differ in 32-bit and
64-bit.

This patch is removing the exception handlers from the test.

https://reviews.llvm.org/D22484

Files:
  test/asan/TestCases/Windows/dll_host.cc

Index: test/asan/TestCases/Windows/dll_host.cc
===================================================================
--- test/asan/TestCases/Windows/dll_host.cc
+++ test/asan/TestCases/Windows/dll_host.cc
@@ -5,15 +5,16 @@
 // RUN: %clang_cl_asan -O0 %s -Fe%t
 //
 // Get the list of ASan wrappers exported by the main module RTL:
-// RUN: dumpbin /EXPORTS %t | grep -o "__asan_wrap[^ ]*" | grep -v @ | sort | uniq > %t.exported_wrappers
+// (note: We need to filter out: _except_handler3, _except_handler4 and __C_specific_handler)
+// RUN: dumpbin /EXPORTS %t | grep -o "__asan_wrap[^ ]*" | sed /_handler/d | grep -v @ | sort | uniq > %t.exported_wrappers
 // FIXME: we should really check the other __asan exports too.
 // RUN: dumpbin /EXPORTS %t | grep -o "__sanitizer_[^ ]*" | grep -v @ | sort | uniq >> %t.exported_wrappers
 //
 // Get the list of ASan wrappers imported by the DLL RTL:
 // [BEWARE: be really careful with the sed commands, as this test can be run
-//  from different environemnts with different shells and seds]
-// RUN: grep INTERCEPT_LIBRARY_FUNCTION %p/../../../../lib/asan/asan_win_dll_thunk.cc | grep -v define | sed -e s/.*(/__asan_wrap_/ | sed -e s/).*// | sort | uniq > %t.dll_imports
-// RUN: grep "^INTERFACE_FUNCTION.*sanitizer" %p/../../../../lib/asan/asan_win_dll_thunk.cc | grep -v define | sed -e s/.*(// | sed -e s/).*// | sort | uniq >> %t.dll_imports
+//  from different environments with different shells and seds]
+// RUN: grep INTERCEPT_LIBRARY_FUNCTION %p/../../../../lib/asan/asan_win_dll_thunk.cc | grep -v define | sed /_handler/d | sed -e s/.*(/__asan_wrap_/ | sed -e s/).*// | sort | uniq > %t.dll_imports
+// RUN: grep "^INTERFACE_FUNCTION.*sanitizer" %p/../../../../lib/asan/asan_win_dll_thunk.cc | grep -v define | sed /_handler/d | sed -e s/.*(// | sed -e s/).*// | sort | uniq >> %t.dll_imports
 //
 // Now make sure the DLL thunk imports everything:
 // RUN: echo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22484.64396.patch
Type: text/x-patch
Size: 1920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160718/89572945/attachment.bin>


More information about the llvm-commits mailing list