This is an archive of the discontinued LLVM Phabricator instance.

[asan] Don't assert that a target is within 2GB on 32-bit Windows
ClosedPublic

Authored by rnk on Nov 14 2016, 4:46 PM.

Details

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.

Event Timeline

rnk updated this revision to Diff 77917.Nov 14 2016, 4:46 PM
rnk retitled this revision from to [asan] Don't assert that a target is within 2GB on 32-bit Windows.
rnk updated this object.
rnk added a reviewer: etienneb.
rnk added a subscriber: llvm-commits.
etienneb accepted this revision.Nov 15 2016, 7:56 AM
etienneb edited edge metadata.

lg, thanks for the fix

lib/interception/tests/interception_win_test.cc
220

nit: coding style is {} instead of {0} ?

This revision is now accepted and ready to land.Nov 15 2016, 7:56 AM
rnk added inline comments.Nov 15 2016, 10:38 AM
lib/interception/tests/interception_win_test.cc
220

Sure, done.

This revision was automatically updated to reflect the committed changes.