summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_win.cc
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-07-21 02:32:37 +0000
committerEtienne Bergeron <etienneb@google.com>2016-07-21 02:32:37 +0000
commitb935daf7a5398ac1788274c32a2c75e18193b159 (patch)
tree00c6a2fcbf6145d6b8ca31a8662a7c0ff45e2b95 /lib/sanitizer_common/sanitizer_win.cc
parenta793e98abbaa2609c5074aa8c614931380c69944 (diff)
[compiler-rt] Fix broken SymInitialize unittest
Summary: By adding the initialisation of the symbolisation library (DbgHelp) we are swapping the order in which both warnings are produced. We can't use CHECK-NEXT as the dbghelp warning is multiline. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: https://reviews.llvm.org/D22586 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_win.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_win.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_win.cc b/lib/sanitizer_common/sanitizer_win.cc
index d8975595a..36d9204f8 100644
--- a/lib/sanitizer_common/sanitizer_win.cc
+++ b/lib/sanitizer_common/sanitizer_win.cc
@@ -735,6 +735,8 @@ void BufferedStackTrace::SlowUnwindStackWithContext(uptr pc, void *context,
STACKFRAME64 stack_frame;
memset(&stack_frame, 0, sizeof(stack_frame));
+ InitializeDbgHelpIfNeeded();
+
size = 0;
#if defined(_WIN64)
int machine_type = IMAGE_FILE_MACHINE_AMD64;