[PATCH] D28598: [compiler-rt] [Sanitizer Coverage] Provide access to the default implementation of weak functions from sanitizer coverage for MD on Windows.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 10:37:45 PST 2017


mpividori updated this revision to Diff 85423.

https://reviews.llvm.org/D28598

Files:
  lib/asan/asan_win_dynamic_runtime_thunk.cc


Index: lib/asan/asan_win_dynamic_runtime_thunk.cc
===================================================================
--- lib/asan/asan_win_dynamic_runtime_thunk.cc
+++ lib/asan/asan_win_dynamic_runtime_thunk.cc
@@ -25,9 +25,28 @@
 // simplifies the build procedure.
 #ifdef ASAN_DYNAMIC_RUNTIME_THUNK
 #include "sanitizer_common/sanitizer_win_defs.h"
+#include "sanitizer_common/sanitizer_interface_internal.h"
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
+// Define weak alias for all weak functions imported from asan dll.
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_cmp)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_cmp1)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_cmp2)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_cmp4)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_cmp8)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_switch)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_div4)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_div8)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_gep)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_pc_indir)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_pc_guard)
+WIN_WEAK_IMPORT_DEF(__sanitizer_cov_trace_pc_guard_init)
+WIN_WEAK_IMPORT_DEF(__asan_default_options)
+WIN_WEAK_IMPORT_DEF(__asan_on_error)
+WIN_WEAK_IMPORT_DEF(__sanitizer_report_error_summary)
+WIN_WEAK_IMPORT_DEF(__sanitizer_sandbox_on_notify)
+
 // First, declare CRT sections we'll be using in this file
 #pragma section(".CRT$XIB", long, read)  // NOLINT
 #pragma section(".CRT$XID", long, read)  // NOLINT


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28598.85423.patch
Type: text/x-patch
Size: 1495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170123/24323fa4/attachment.bin>


More information about the llvm-commits mailing list