From 386e2d853b9f37d16f1b11c725e9eb30f0b924fa Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Mon, 19 Nov 2012 10:31:00 +0000 Subject: [asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu llvm-svn: 168306 --- compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'compiler-rt/lib') diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc index 0a54e7c9867..28ee9600d0a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc @@ -123,18 +123,18 @@ void StackTrace::FastUnwindStack(uptr pc, uptr bp, uptr stack_top, uptr stack_bottom) { CHECK(size == 0 && trace[0] == pc); size = 1; - uptr *frame = (uptr*)bp; - uptr *prev_frame = frame; + uhwptr *frame = (uhwptr *)bp; + uhwptr *prev_frame = frame; while (frame >= prev_frame && - frame < (uptr*)stack_top - 2 && - frame > (uptr*)stack_bottom && + frame < (uhwptr *)stack_top - 2 && + frame > (uhwptr *)stack_bottom && size < max_size) { - uptr pc1 = frame[1]; + uhwptr pc1 = frame[1]; if (pc1 != pc) { - trace[size++] = pc1; + trace[size++] = (uptr) pc1; } prev_frame = frame; - frame = (uptr*)frame[0]; + frame = (uhwptr *)frame[0]; } } -- cgit v1.2.3