Page MenuHomePhabricator

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

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



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.

Diff Detail


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

220 ↗(On Diff #77917)

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
220 ↗(On Diff #77917)

Sure, done.

This revision was automatically updated to reflect the committed changes.