[asan] Don't assert that a target is within 2GB on 32-bit Windows
authorReid Kleckner <rnk@google.com>
Tue, 15 Nov 2016 18:29:17 +0000 (18:29 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 15 Nov 2016 18:29:17 +0000 (18:29 +0000)
commit0d7c42c7abb3a822ce5b3c5960923dee07cc496f
treee0bf3ef2df0e321cf65e8b3d7c905f4bdcef3026
parentb17efcbcc560859636c8e28c0388f750a73f1918
[asan] Don't assert that a target is within 2GB on 32-bit Windows

Summary:
In a 32-bit address space, PC-relative jump targets are wrapped, so a
direct branch at 0x90000001 can reach address 0x10000000 with a
displacement of 0x7FFFFFFFF. This can happen in applications, such as
Chrome, that are linked with /LARGEADDRESSAWARE.

Reviewers: etienneb

Subscribers: mgorny, llvm-commits

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

llvm-svn: 286997
compiler-rt/lib/interception/interception_win.cc
compiler-rt/lib/interception/tests/CMakeLists.txt
compiler-rt/lib/interception/tests/interception_win_test.cc