[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

llvm-svn: 276228
This commit is contained in:
Etienne Bergeron 2016-07-21 02:32:37 +00:00
parent 8430489847
commit d4528b2ea1
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -16,8 +16,8 @@ int main() {
// CHECK: ERROR: AddressSanitizer: access-violation on unknown address
// CHECK: The signal is caused by a WRITE memory access.
// CHECK: Hint: address points to the zero page.
// CHECK-NEXT: {{WARNING: Failed to use and restart external symbolizer}}
// CHECK-NEXT: {{WARNING: .*DbgHelp}}
// CHECK: {{WARNING: .*DbgHelp}}
// CHECK: {{WARNING: Failed to use and restart external symbolizer}}
// CHECK: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-6]]
// CHECK: AddressSanitizer can not provide additional info.
}