diff options
Diffstat (limited to 'test/asan/TestCases/Windows/dll_host.cc')
-rw-r--r-- | test/asan/TestCases/Windows/dll_host.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/asan/TestCases/Windows/dll_host.cc b/test/asan/TestCases/Windows/dll_host.cc index 6a029c96d4d8..512f930bc34f 100644 --- a/test/asan/TestCases/Windows/dll_host.cc +++ b/test/asan/TestCases/Windows/dll_host.cc @@ -7,18 +7,23 @@ // Get the list of ASan wrappers exported by the main module RTL: // note: The mangling decoration (i.e. @4 )is removed because calling convention // differ from 32-bit and 64-bit. -// RUN: dumpbin /EXPORTS %t | grep -o "__asan_wrap[^ ]*" | sed -e s/@.*// > %t.exported_wrappers1 -// FIXME: we should really check the other __asan exports too. -// RUN: dumpbin /EXPORTS %t | grep -o "__sanitizer_[^ ]*" | sed -e s/@.*// > %t.exported_wrappers2 +// RUN: dumpbin /EXPORTS %t | grep -o "__asan_wrap[^ ]*" | sed -e s/@.*// > %t.exports1 +// +// The exception handlers differ in 32-bit and 64-bit, so we ignore them: +// RUN: grep '[E]XPORT:' %s | sed -e 's/.*[E]XPORT: //' > %t.exports2 +// EXPORT: __asan_wrap__except_handler3 +// EXPORT: __asan_wrap__except_handler4 +// EXPORT: __asan_wrap___C_specific_handler // // 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/).*// > %t.dll_imports1 -// RUN: grep "^INTERFACE_FUNCTION.*sanitizer" %p/../../../../lib/asan/asan_win_dll_thunk.cc | grep -v define | sed -e s/.*(// | sed -e s/).*// > %t.dll_imports2 +// RUN: grep INTERCEPT_LIBRARY_FUNCTION %p/../../../../lib/asan/asan_win_dll_thunk.cc \ +// RUN: | grep -v define | sed -e s/.*(/__asan_wrap_/ -e s/).*// \ +// RUN: > %t.imports1 // // Add functions interecepted in asan_malloc.win.cc and asan_win.cc. -// RUN: grep '[I]MPORT:' %s | sed -e 's/.*[I]MPORT: //' > %t.dll_imports3 +// RUN: grep '[I]MPORT:' %s | sed -e 's/.*[I]MPORT: //' > %t.imports2 // IMPORT: __asan_wrap_HeapAlloc // IMPORT: __asan_wrap_HeapFree // IMPORT: __asan_wrap_HeapReAlloc @@ -26,20 +31,15 @@ // IMPORT: __asan_wrap_CreateThread // IMPORT: __asan_wrap_RaiseException // IMPORT: __asan_wrap_RtlRaiseException +// IMPORT: __asan_wrap_SetUnhandledExceptionFilter // -// The exception handlers differ in 32-bit and 64-bit, so we ignore them: -// RUN: grep '[E]XPORT:' %s | sed -e 's/.*[E]XPORT: //' > %t.exported_wrappers3 -// EXPORT: __asan_wrap__except_handler3 -// EXPORT: __asan_wrap__except_handler4 -// EXPORT: __asan_wrap___C_specific_handler -// -// RUN: cat %t.dll_imports1 %t.dll_imports2 %t.dll_imports3 | sort | uniq > %t.dll_imports-sorted -// RUN: cat %t.exported_wrappers1 %t.exported_wrappers2 %t.exported_wrappers3 | sort | uniq > %t.exported_wrappers-sorted +// RUN: cat %t.imports1 %t.imports2 | sort | uniq > %t.imports-sorted +// RUN: cat %t.exports1 %t.exports2 | sort | uniq > %t.exports-sorted // // Now make sure the DLL thunk imports everything: // RUN: echo // RUN: echo "=== NOTE === If you see a mismatch below, please update asan_win_dll_thunk.cc" -// RUN: diff %t.dll_imports-sorted %t.exported_wrappers-sorted +// RUN: diff %t.imports-sorted %t.exports-sorted // REQUIRES: asan-static-runtime #include <stdio.h> |