diff options
author | Kostya Serebryany <kcc@google.com> | 2012-08-28 14:14:30 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-08-28 14:14:30 +0000 |
commit | 27dcb2379ff5096c04282f9e2c18529125cabc5e (patch) | |
tree | ff2bd1a3ca7d746c69240e61988ddeae43bb2c88 /compiler-rt/lib/asan/asan_win.cc | |
parent | 7575968aa4cb3663aae66f95edf8a017487aca2d (diff) | |
download | bcm5719-llvm-27dcb2379ff5096c04282f9e2c18529125cabc5e.tar.gz bcm5719-llvm-27dcb2379ff5096c04282f9e2c18529125cabc5e.zip |
[asan] fix Windows build
llvm-svn: 162758
Diffstat (limited to 'compiler-rt/lib/asan/asan_win.cc')
-rw-r--r-- | compiler-rt/lib/asan/asan_win.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index 17687628726..dc2654a3ae1 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/lib/asan/asan_win.cc @@ -32,15 +32,15 @@ static AsanLock dbghelp_lock(LINKER_INITIALIZED); static bool dbghelp_initialized = false; #pragma comment(lib, "dbghelp.lib") -void StackTrace::GetStackTrace(uptr max_s, uptr pc, uptr bp) { - max_size = max_s; +void GetStackTrace(StackTrace *stack, uptr max_s, uptr pc, uptr bp) { + stack->max_size = max_s; void *tmp[kStackTraceMax]; // FIXME: CaptureStackBackTrace might be too slow for us. // FIXME: Compare with StackWalk64. // FIXME: Look at LLVMUnhandledExceptionFilter in Signals.inc - uptr cs_ret = CaptureStackBackTrace(1, max_size, tmp, 0), - offset = 0; + uptr cs_ret = CaptureStackBackTrace(1, stack->max_size, tmp, 0); + uptr offset = 0; // Skip the RTL frames by searching for the PC in the stacktrace. // FIXME: this doesn't work well for the malloc/free stacks yet. for (uptr i = 0; i < cs_ret; i++) { @@ -50,9 +50,9 @@ void StackTrace::GetStackTrace(uptr max_s, uptr pc, uptr bp) { break; } - size = cs_ret - offset; - for (uptr i = 0; i < size; i++) - trace[i] = (uptr)tmp[i + offset]; + stack->size = cs_ret - offset; + for (uptr i = 0; i < stack->size; i++) + stack->trace[i] = (uptr)tmp[i + offset]; } bool WinSymbolize(const void *addr, char *out_buffer, int buffer_size) { |