[asan] Don't print rows of shadow bytes outside shadow memory
authorReid Kleckner <rnk@google.com>
Wed, 25 Oct 2017 16:54:12 +0000 (16:54 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 25 Oct 2017 16:54:12 +0000 (16:54 +0000)
commit03d02a0e1d77afdab64deb859c18ae815527e40f
tree945f25525c59b8075f4a3b9cca4c71c53fe52bb2
parent47e093da9b48260e6f030fc21a96ef03b4a1fec5
[asan] Don't print rows of shadow bytes outside shadow memory

Summary:
They might not be mapped on some platforms such as Win64.  In
particular, this happens if the user address is null. There will not be
any shadow memory 5*16 bytes before the user address. This happens on
Win64 in the error_report_callback.cc test case. It's not clear why this
isn't a problem on Linux as well.

Fixes PR35058

Reviewers: vitalybuka

Subscribers: kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D39260

llvm-svn: 316589
compiler-rt/lib/asan/asan_errors.cc